[Xymon] FILES in analysis.cfg
Roland Soderstrom
Rolands at logicaltech.com.au
Tue Feb 18 23:36:19 CET 2014
That worked perfectly!
Just have to reverse the logic....
Thanks Henrik, amazing as always :D
- Roland
-----Original Message-----
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Henrik Størner
Sent: Wednesday, 19 February 2014 8:55 AM
To: xymon at xymon.com
Subject: Re: [Xymon] FILES in analysis.cfg
Den 18-02-2014 21:52, Roland Soderstrom skrev:
> Hi,
>
> That part work just fine.
> Anything the * expands to will be picked up by xymon.
>
> My question is the FILE directive in the analysis.cfg If I just set it
> to FILE /var/tmp/sys-heartbeat-myhost red MTIME<3700 Everything works
> just fine.
> But,
> If I change it to:
> FILE /var/tmp/sys-heartbeat-myhostttt red MTIME<3700 If I read the
> manual correctly it should go RED because there is no file called
> /var/tmp/sys-heartbeat-myhostttt If I touch the new myhostttt file it
> will show up on the test page That means the file:`ls -1
> /var/tmp/sys-heartbeat-*` Works just fine as it should.
>
> So how do I get the files test go RED on a missing file?
OK, I had to do some testing with this.
The problem is that when the file does not exist, then the `ls -1 ...` will not produce any output. Without any output, Xymon cannot tell that there is a file-check happening.
If you have an explicit filename in client-local.cfg, then the FILE check in analysis.cfg works as expected, because the xymon client will report that the specific file is missing.
So:
client-local.cfg:
[myhost]
file:/var/tmp/sys-heartbeat-myhost
analysis.cfg
HOST=myhost
FILE %^/var/tmp/sys-heartbeat-.* MTIME<3700
This will go red if the file is missing, or it exists and is older than
3700 seconds.
Regards,
Henrik
_______________________________________________
Xymon mailing list
Xymon at xymon.com
http://lists.xymon.com/mailman/listinfo/xymon
More information about the Xymon
mailing list