Xymon Mailing List Archive search

Testing files

list Galen Johnson
Thu, 12 Jul 2018 13:41:01 -0400
Message-Id: <CAJpizT3DjBLB9JsVc6dsJR=user-9c3bf75c5aca@xymon.invalid>

Look at the analysis,cfg file or man page for how to do what you're
asking.  That is where you add your file tests.  The client-local.cfg makes
the files available to be monitored.

On Thu, Jul 12, 2018 at 1:36 PM Jaap Winius <user-16708c3648e1@xymon.invalid> wrote:
Hi folks,

According to

http://xymon.sourceforge.net/xymon/help/manpages/man5/client-local.cfg.5.htm

it's possible to add file configuration entries to
/etc/xymon/client-local.cfg. For example, to check for the existence
of a file called /tmp/krb5cc_0 on host.example.com, I'd add this stanza:

   [bap1.umrk.nl]
   file:/tmp/krb5cc_0

That works. However, the above mentioned manpage also says this about
file configuration entries:

"A file monitoring entry is used to watch the meta-data of a file:
Owner, group, size, permissions, checksum etc."

Meta data? How is that done? Except for some hash settings, no
examples are given. To check to see if the example file is always less
than 3600 seconds old, I would think something like this would be
necessary:

   [bap1.umrk.nl]
   file:/tmp/krb5cc_0 mtime<3600

Or possibly:

   [bap1.umrk.nl]
   file:/tmp/krb5cc_0:mtime<3600

But, these don't seem to work: Xymon still only reports that the file
exists.

Would anyone mind explaining what the correct syntax is for this file
test and perhaps other ones like it (e.g. for owner, group, file size,
permissions)?

Thanks,

Jaap