[hobbit] file monitoring with mtime&noexist

dOCtoR MADneSs doctor at makelofine.org
Fri May 15 13:46:15 CEST 2009


martin.flemming at desy.de a écrit :
>
> Hi !
>
> .. i want to monitor the /var/run/yum.pid file
> for hanging yum-process ...
>
> So my hobbit-client.cfg looks like
>
> FILE  /var/run/yum.pid mtime>86400 noexist
>
> I want an alert, if the file exits and it's older than 24 hours,
> but i've got an alarm if it's exists and not if it's exist and already 
> 24hours old ...
>
> Got somebody an idea how it works ?
>
> .. or did i something misunderstood ...
>
>
> thanks & cheers
>
>
>
>        Martin
>
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
I needed to do same, so here is what I did :

in client-local.cfg (hosted on xymon server) :

[your_host]
file:`find /var/run -name "yum.pid" -mtime +86400`

Then in hobbit-clients.cfg (hosted on xymon server too) :

HOST=yourhost
    FILE   /var/run/yum.pid red NOEXIST

Of course, you can use yellow instead of red.

Then reload your xymon server (restart is not needed) and wait a little. 
The client on your host will ask xymon server the section in 
client-local.cfg, then it'll apply it, so the changes should take about 
15minutes to be applied.



More information about the Xymon mailing list