Xymon Mailing List Archive search

Best way to monitor for configuration value?

list Tim McCloskey
Thu, 20 Sep 2012 02:49:20 +0000
Message-Id: <user-511406d4372d@xymon.invalid>


From: Jeremy Laidman [user-71895fb2e44c@xymon.invalid]

Sent: Wednesday, September 19, 2012 6:29 PM

To: Tim McCloskey

Cc: user-c61747246f66@xymon.invalid; xymon at xymon.com

Subject: Re: [Xymon] Best way to monitor for configuration value?


On 20 September 2012 07:25, Tim McCloskey 
<user-440820cc07d6@xymon.invalid> wrote:


You could use md5 but if the config file has other changes that you don't care about then this wont work.  Unless there is only one value that changes I don't see any other option except an external test, which whould be easy to implement.


What would be really useful, I think, is the ability to specify a custom hash command using backticks.  Something like this:


client-local.cfg:
    file:/path/to/file:`/usr/bin/sed -n '/^var=/s/^var=//p' /path/to/file`


analysis.cfg:
    HOST=blabla
        FILE /path/to/file HASH="foo"


J

Jeremy, 

Both pretty cool ideas, never knew about linecount.  Then, I'm still on 4.2.0 so there's alot I don't know :)
External scripts work fine for me, but I like the integration that Xymon now gives out of the box.

Thanks, 
-t