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: Jan-Henrik Haukeland
Subject: Re: timestamp monitoring + code simplification patch
Date: 28 Nov 2002 23:47:53 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

Martin Pala <address@hidden> writes:

> Hi,
> 
> i wrote feature for monit to allow monitoring timestamp of file or
> directory recently.
> 
> 
> I need this feature to watch health of iPlanet Messaging server stored
> process (it is critical) - this process periodicaly updates timestamp
> of 3 independent state files. As soon as timestamp of any of these
> files is older than expected, it signalizes, that one of tasks, that
> stored deamon does failed and real hell is starting. New statement has
> following syntax:
> 
> 
>   TIMESTAMP object [operator] value [unit] [action]

Such functionality is not a big issue for me, but never the less it's
an interesting feature and here's my +1 vote for including it in monit.

Another thing, since this is connected to the filesystem and we
already have decided to do file-system check (that is, raise an alert
if the size of a device or file system is passing a specified
treshold) and maybe with a little extra work you can extend this to
include such a check? I know Rory has this in his pipeline but I do
not think he has started yet? And if I'm right you will on only need
to do a little bit more work to finalize such a function?

Yet another thing, we should discuss the syntax. Up until know we have
only had one major statement which is the 'check name with pidfile'
and with option. This is going to be a stand-alone statement with the
same scope as the check-statement.

I'm wondering if we should keep with the check idiom and we could also
combine this with the new filesystem test and use something like
(instead of IF TIMESTAMP and such):


CHECK DEVICE NAME ..options..
CHECK DIRECTORY NAME ..options..
CHECK FILE NAME ..options..

and here are some examples combining it with your timestamp
functionality:

check file "/usr/iplanet/msg-ims1/config/stored.ckp"
    if timestamp  > 5 minutes  then alert martin
    if size > 10Mb then alert hauk #New option
    if deleted then alert address@hidden

check directory "/foo/directory"
    if timestamp < 10 minutes then alert martin
    if size > 100Mb then alert #New option
    if deleted then alert address@hidden
    

This one probably does not need a timestamp check?

check device /dev/hda1
    if used > 100Gb then alert martin or
    if available < 100Mb the alert martin


-- 
Jan-Henrik Haukeland




reply via email to

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