Xymon Mailing List Archive search

file monitoring with mtime&noexist

4 messages in this thread

list Martin Flemming · Fri, 15 May 2009 13:35:00 +0200 (CEST) ·
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
list dOCtoR MADneSs · Fri, 15 May 2009 13:46:15 +0200 ·
quoted from Martin Flemming
user-f286aaa49a76@xymon.invalid 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

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.
list Martin Flemming · Fri, 15 May 2009 14:39:05 +0200 (CEST) ·
Great, thanks a lot !

But i wonder a little bit, that it works for you with
file:`find /var/run -name "yum.pid" -mtime +86400`
because -mtime +86400 means 86400 * 24 hours

      -mtime n
               File's data was last modified n*24 hours ago.

I use now -mmin +60

        -mmin n
               File's data was last modified n minutes ago.

And it works great !


thanks
 	martin
quoted from dOCtoR MADneSs


On Fri, 15 May 2009, dOCtoR MADneSs wrote:
user-f286aaa49a76@xymon.invalid 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

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.

list Schwarz Frank · Fri, 15 May 2009 14:49:11 +0200 ·
Hello,

I tried to monitor filesize, like this:

file:/var/adm/lastlog in client-local.cfg

and 
FILE /var/adm/lastlog SIZE<200 yellow   in hobbit-clients.cfg

but the result in Xymon is:

/var/adm/lastlog
File has size 1205958097242064  - should be <8585729928

The File /var/adm/lastlog is about 280k


best regards Frank
quoted from dOCtoR MADneSs


-----Ursprüngliche Nachricht-----
Von: dOCtoR MADneSs [mailto:user-d54077869176@xymon.invalid] Gesendet: Freitag, 15. Mai 2009 13:46
An: user-ae9b8668bcde@xymon.invalid
Betreff: Re: [hobbit] file monitoring with mtime&noexist

user-f286aaa49a76@xymon.invalid 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

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.


The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.