monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: timestamp monitoring + code simplification patch


From: Martin Pala
Subject: Re: timestamp monitoring + code simplification patch
Date: Fri, 29 Nov 2002 18:47:28 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020913 Debian/1.1-1

Jan-Henrik Haukeland wrote:

Martin Pala <address@hidden> writes:

CHECK [FILE|DIRECTORY|DEVICE] PATH options,...
CHECK [PROCESS] name options,...

I think I like this one better, but your suggestion:

CHECK [PROCESS|FILE|DIRECTORY|DEVICE] PATH options,...

are certainly nice and symmetrically. But the reasons I like the first
one better are

1) It looks a bit strange to say
  CHECK PROCESS "/var/run/sshd.pid"
   NAME ssh

My suggestion allows to use (more logical) verbose form as well. I thing following gives a sense:

CHECK PROCESS WITH PIDFILE "/var/run/sshd.pid"
 NAME ssh

(as mentioned WITH and PIDFILE could be void words)


instead of
  CHECK [PROCESS] sshd WITH PIDFILE "/var/run/sshd.pid"

2) Backward compability will, if not broken, require changes in the
  parser and logic I'm not sure I'm quite comfortable with.

Yeah, it could be problem with compatibility, however for future development and clearness i think it will be better to have "symentric" solution and optional NAME statement)


3) In my opinion the first example does after all look more logical
  and the bonus is that it does not require any refactoring of the
  current grammar in the parser.

So the bottom line is that I suggest that we stick with:

CHECK [PROCESS] name [WITH PIDFILE] options,...

including PROCESS as optional and use the following for filesystem
checks:

CHECK [FILE|DIRECTORY|DEVICE] PATH options,...

What do you think?

OK, i have no problem with your solution :)

Cheers,
Martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]