Xymon Mailing List Archive search

FILES syntax error?

5 messages in this thread

list Rolf Schrittenlocher · Fri, 19 Nov 2010 09:30:02 +0100 ·
Hi to all,

as I got no answer yet I try again: As far as I understand the man-pages, the syntax of the snippet from hobbit-clients.cfg is correct. Could anyone approve that or tell me what is wrong?

That would be very helpful, thanks,
Rolf


The question I posted as "FILES for different hosts" was:
seeming rather simple but I cannot find the solution. I'm monitoring some files with md5 checksum for changes. All those files had the same md5 on all servers:
FILE /usr/bin/ps MTIME>600 MD5=facb1ea65094c87058df4f0ffdf7306a         red

Now a new server has a different installation so I added him in hobbit-clients.cfg above the first entry:
FILE /usr/bin/ps MTIME>600 MD5=76b66713137851c1407fd9ea20785bc0 HOST=<new host>      red
FILE /usr/bin/ps MTIME>600 MD5=facb1ea65094c87058df4f0ffdf7306a         red

But for the check the old entry is used:

File has MD5 hash 76b66713137851c1407fd9ea20785bc0  - should be facb1ea65094c87058df4f0ffdf7306a

Could you give me a hint? Thanks!
Rolf Schrittenlocher

-- 
Mit freundlichen Gruessen
Rolf Schrittenlocher

HeBIS-IT, Senckenberganlage 31, 60054 Frankfurt
Tel: (XX) XX - XXX XXXXX   Fax: (XX) XX XXX XXXXX
LBS: user-1e39a1813094@xymon.invalid
Persoenlich: user-ea9d95bffcf0@xymon.invalid
list Tim McCloskey · Fri, 19 Nov 2010 09:20:21 -0800 ·
Hi, 

One thing I can remember about the client config is that the DEFAULT stanza must appear last.  I'm using 4.2.0 and the syntax below is working for me.  (you don't need the GROUP statement for this).

HOST=someserver GROUP=somegroup
FILE /somepath/somefile SIZE<55M and SIZE>0 red

I can test with another line (HOST=newserver) and see the results.  Will let you know later.

Tim
quoted from Rolf Schrittenlocher


From: Rolf Schrittenlocher [user-ea9d95bffcf0@xymon.invalid]
Sent: Friday, November 19, 2010 12:30 AM
To: xymon at xymon.com
Subject: [xymon] FILES syntax error?

Hi to all,

as I got no answer yet I try again: As far as I understand the
man-pages, the syntax of the snippet from hobbit-clients.cfg is correct.
Could anyone approve that or tell me what is wrong?

That would be very helpful, thanks,
Rolf


The question I posted as "FILES for different hosts" was:
seeming rather simple but I cannot find the solution. I'm monitoring
some files with md5 checksum for changes. All those files had the same
md5 on all servers:
FILE /usr/bin/ps MTIME>600 MD5=facb1ea65094c87058df4f0ffdf7306a         red

Now a new server has a different installation so I added him in
hobbit-clients.cfg above the first entry:
FILE /usr/bin/ps MTIME>600 MD5=76b66713137851c1407fd9ea20785bc0
HOST=<new host>      red
FILE /usr/bin/ps MTIME>600 MD5=facb1ea65094c87058df4f0ffdf7306a         red

But for the check the old entry is used:

File has MD5 hash 76b66713137851c1407fd9ea20785bc0  - should be
facb1ea65094c87058df4f0ffdf7306a

Could you give me a hint? Thanks!
Rolf Schrittenlocher

--
Mit freundlichen Gruessen
Rolf Schrittenlocher

HeBIS-IT, Senckenberganlage 31, 60054 Frankfurt
Tel: (XX) XX - XXX XXXXX   Fax: (XX) XX XXX XXXXX
LBS: user-1e39a1813094@xymon.invalid
Persoenlich: user-ea9d95bffcf0@xymon.invalid

list Tim McCloskey · Fri, 19 Nov 2010 09:34:22 -0800 ·
The following syntax is working for me.  The file tested is on an NFS mounted fs, so it's the same file on both systems.  I just added a test that I new would fail (size over 1K).  Works as expected.  I don't think this syntax would be any different for md5's.

...
HOST=someserver GROUP=somegroup
FILE /somepath/somefile SIZE<55M and SIZE>0 red

HOST=newserver GROUP=somegroup
FILE /somefile/somepath SIZE<10K and SIZE>0 red
...

Regards, 

Tim
quoted from Tim McCloskey


From: Tim McCloskey [user-440820cc07d6@xymon.invalid]
Sent: Friday, November 19, 2010 9:20 AM
To: xymon at xymon.com
Subject: RE: [xymon] FILES syntax error?

Hi,

One thing I can remember about the client config is that the DEFAULT stanza must appear last.  I'm using 4.2.0 and the syntax below is working for me.  (you don't need the GROUP statement for this).

HOST=someserver GROUP=somegroup
FILE /somepath/somefile SIZE<55M and SIZE>0 red

I can test with another line (HOST=newserver) and see the results.  Will let you know later.

Tim


From: Rolf Schrittenlocher [user-ea9d95bffcf0@xymon.invalid]
Sent: Friday, November 19, 2010 12:30 AM
To: xymon at xymon.com
Subject: [xymon] FILES syntax error?

Hi to all,

as I got no answer yet I try again: As far as I understand the
man-pages, the syntax of the snippet from hobbit-clients.cfg is correct.
Could anyone approve that or tell me what is wrong?

That would be very helpful, thanks,
Rolf


The question I posted as "FILES for different hosts" was:
seeming rather simple but I cannot find the solution. I'm monitoring
some files with md5 checksum for changes. All those files had the same
md5 on all servers:
FILE /usr/bin/ps MTIME>600 MD5=facb1ea65094c87058df4f0ffdf7306a         red

Now a new server has a different installation so I added him in
hobbit-clients.cfg above the first entry:
FILE /usr/bin/ps MTIME>600 MD5=76b66713137851c1407fd9ea20785bc0
HOST=<new host>      red
FILE /usr/bin/ps MTIME>600 MD5=facb1ea65094c87058df4f0ffdf7306a         red

But for the check the old entry is used:

File has MD5 hash 76b66713137851c1407fd9ea20785bc0  - should be
facb1ea65094c87058df4f0ffdf7306a

Could you give me a hint? Thanks!
Rolf Schrittenlocher

--
Mit freundlichen Gruessen
Rolf Schrittenlocher

HeBIS-IT, Senckenberganlage 31, 60054 Frankfurt
Tel: (XX) XX - XXX XXXXX   Fax: (XX) XX XXX XXXXX
LBS: user-1e39a1813094@xymon.invalid
Persoenlich: user-ea9d95bffcf0@xymon.invalid

list Rolf Schrittenlocher · Mon, 22 Nov 2010 10:23:07 +0100 ·
Thank you, Tim,

the problem is solved. Your way should work, I found another one. I 
added EXHOST to the default, too:

         FILE /usr/bin/ps HOST=<new host> MTIME>600 
MD5=76b66713137851c1407fd9ea20785bc0              red
         FILE /usr/bin/ps EXHOST=<new host> MTIME>600 
MD5=facb1ea65094c87058df4f0ffdf7306a            red

kind regards,
Rolf
quoted from Tim McCloskey
The following syntax is working for me.  The file tested is on an NFS mounted fs, so it's the same file on both systems.  I just added a test that I new would fail (size over 1K).  Works as expected.  I don't think this syntax would be any different for md5's.

...
HOST=someserver GROUP=somegroup
FILE /somepath/somefile SIZE<55M and SIZE>0 red

HOST=newserver GROUP=somegroup
FILE /somefile/somepath SIZE<10K and SIZE>0 red
...

Regards,

Tim


From: Tim McCloskey [user-440820cc07d6@xymon.invalid]
Sent: Friday, November 19, 2010 9:20 AM
To: xymon at xymon.com
Subject: RE: [xymon] FILES syntax error?

Hi,

One thing I can remember about the client config is that the DEFAULT stanza must appear last.  I'm using 4.2.0 and the syntax below is working for me.  (you don't need the GROUP statement for this).

HOST=someserver GROUP=somegroup
FILE /somepath/somefile SIZE<55M and SIZE>0 red

I can test with another line (HOST=newserver) and see the results.  Will let you know later.

Tim


From: Rolf Schrittenlocher [user-ea9d95bffcf0@xymon.invalid]
Sent: Friday, November 19, 2010 12:30 AM
To: xymon at xymon.com
Subject: [xymon] FILES syntax error?

Hi to all,

as I got no answer yet I try again: As far as I understand the
man-pages, the syntax of the snippet from hobbit-clients.cfg is correct.
Could anyone approve that or tell me what is wrong?

That would be very helpful, thanks,
Rolf


The question I posted as "FILES for different hosts" was:
seeming rather simple but I cannot find the solution. I'm monitoring
some files with md5 checksum for changes. All those files had the same
md5 on all servers:
FILE /usr/bin/ps MTIME>600 MD5=facb1ea65094c87058df4f0ffdf7306a         red

Now a new server has a different installation so I added him in
hobbit-clients.cfg above the first entry:
FILE /usr/bin/ps MTIME>600 MD5=76b66713137851c1407fd9ea20785bc0
HOST=<new host>       red
FILE /usr/bin/ps MTIME>600 MD5=facb1ea65094c87058df4f0ffdf7306a         red

But for the check the old entry is used:

File has MD5 hash 76b66713137851c1407fd9ea20785bc0  - should be
facb1ea65094c87058df4f0ffdf7306a

Could you give me a hint? Thanks!
Rolf Schrittenlocher

--
Mit freundlichen Gruessen
Rolf Schrittenlocher

HeBIS-IT, Senckenberganlage 31, 60054 Frankfurt
Tel: (XX) XX - XXX XXXXX   Fax: (XX) XX XXX XXXXX
LBS: user-1e39a1813094@xymon.invalid
Persoenlich: user-ea9d95bffcf0@xymon.invalid

-- 
Mit freundlichen Gruessen
Rolf Schrittenlocher

HeBIS-IT, Senckenberganlage 31, 60054 Frankfurt
Tel: (XX) XX - XXX XXXXX   Fax: (XX) XX XXX XXXXX
LBS: user-1e39a1813094@xymon.invalid
Persoenlich: user-ea9d95bffcf0@xymon.invalid
list Henrik Størner · Mon, 22 Nov 2010 22:07:57 +0000 (UTC) ·
Hi Rolf,
quoted from Rolf Schrittenlocher

In <user-681ed1d42e4c@xymon.invalid> Rolf Schrittenlocher <user-ea9d95bffcf0@xymon.invalid> writes:
seeming rather simple but I cannot find the solution. I'm monitoring 
some files with md5 checksum for changes. All those files had the same 
md5 on all servers:
FILE /usr/bin/ps MTIME>600 MD5=facb1ea65094c87058df4f0ffdf7306a red
Now a new server has a different installation so I added him in 
hobbit-clients.cfg above the first entry:
FILE /usr/bin/ps MTIME>600 MD5=76b66713137851c1407fd9ea20785bc0 HOST=<new host> red
FILE /usr/bin/ps MTIME>600 MD5=facb1ea65094c87058df4f0ffdf7306a red
But for the check the old entry is used:
File has MD5 hash 76b66713137851c1407fd9ea20785bc0  - should be facb1ea65094c87058df4f0ffdf7306a

What happens is that when evaluating the data for "<new host>", BOTH
of those lines will match. So the result ends up being the last one,
which is that the MD5 checksum is not correct.

To avoid this, add an "EXHOST=<new host>" to the second FILE rule.


Regards,
Henrik