[Xymon] FILE in analysis.cfg

Jeremy Laidman jlaidman at rebel-it.com.au
Fri Apr 12 04:27:57 CEST 2013


On 12 April 2013 01:20, Root, Paul T <Paul.Root at centurylink.com> wrote:

>
> **
>
> Is there a way to tell  analysis that I want to look for this file, but if
> it doesn’t exist, that’s ok?
>

I don't think so.  But you can work around this in client-local.cfg, like
so:

file:`[ -f /path/to/file ] && echo /path/to/file || echo /dev/null`

This will simply send through a different filename in the client data, and
the server-side will act as if you haven't configured it at all, which I
think means it won't report anything.

Also, there seems to be an undocumented modifier "optional" for both FILE
and LOG clauses.  I haven't used this, but it seems you would just append
it to the end of the FILE line in analysis.cfg, like so:

FILE:/path/to/file red mtime<7776000 optional


> While, I’m at it, is mtime> only in seconds or can I put a ‘d’ modifier
> for days on the end of it?
>

Nope, the string after "mtime>" is fed straight into aton() before being
stored in the rule structure, so it can only be digits.

Cheers
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130412/c01c5e02/attachment.html>


More information about the Xymon mailing list