Xymon Mailing List Archive search

file noexists doesn't work

4 messages in this thread

list Galen Johnson · Tue, 2 Oct 2018 20:37:13 -0400 ·
Hey,

Having a hell of a time with this.  I need to alert when a file exists.
According to the manpage I should be able to use the "noexist" test.
However, this doesn't appear to work.  I've tried several combinations and
cases,  Has anyone actually gotten this to work?

In my client_local.cfg. I have a stanza similar to:

[odamid00-prod-us]
file:`ls /pbr/biconfig/940/Lev1/Web/Logs/SASServer*/heaps/*.hprof`

and in analysis,cfig I have:

HOST=%(odamid0).*
       FILE %/pbr/biconfig/940/Lev1/Web/Logs/SASServer*/heaps/*.hprof red
noexist

I've tried using upper case and reversing the order but I cannot get it to
turn red when the file exists.  It does, however, give me a green dot and
show that it sees the file so I'm confident it's at least partly working.
NB: I'm using the latest Terabithia RPM.

=G=

PS: the man page and the analysis.cfg file disagree on the order of [color]
and [things to check] from other experience, the man page is what is
correct.  I think someone may have previously pointed this out.
list Torsten Richter · Wed, 3 Oct 2018 09:53:44 +0200 ·
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Resending to include the list.

On 03.10.2018 09:41, Torsten Richter wrote:
Hi Galen,

the comments in analysis.cfg suggest to use upper case for noexist.
Did you try that as well?

Torsten
quoted from Galen Johnson

On 03.10.2018 02:37, Galen Johnson wrote:
Hey,
Having a hell of a time with this.  I need to alert when a file exists.
According to the manpage I should be able to use the "noexist" test.
However, this doesn't appear to work.  I've tried several combinations and
cases,  Has anyone actually gotten this to work?
In my client_local.cfg. I have a stanza similar to:
[odamid00-prod-us]
file:`ls /pbr/biconfig/940/Lev1/Web/Logs/SASServer*/heaps/*.hprof`
and in analysis,cfig I have:
HOST=%(odamid0).*
       FILE %/pbr/biconfig/940/Lev1/Web/Logs/SASServer*/heaps/*.hprof red
noexist
I've tried using upper case and reversing the order but I cannot get it to
turn red when the file exists.  It does, however, give me a green dot and
show that it sees the file so I'm confident it's at least partly working.
NB: I'm using the latest Terabithia RPM.
=G=
PS: the man page and the analysis.cfg file disagree on the order of [color]
and [things to check] from other experience, the man page is what is
correct.  I think someone may have previously pointed this out.
- -- +---------------------------------------------------------+

| E-mail  : user-c862b499d9fa@xymon.invalid			  |
|							  |
| Homepage: http://www.richter-it.net/			  |
+---------------------------------------------------------+
Download my public key from:
http://keys.gnupg.net/pks/lookup?search=0x899093AC&op=get
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iEYEARECAAYFAlu0dYcACgkQ7DlmxomQk6ymkwCg3/RhLfbujV+jalIGH7yg3ekH
OSQAn1UhtHTXnnGvD1IvEqMetwpLjPxE
=ufZz
-----END PGP SIGNATURE-----
list John Horne · Wed, 3 Oct 2018 11:20:01 +0000 ·
On Tue, 2018-10-02 at 20:37 -0400, Galen Johnson wrote:
HOST=%(odamid0).*
       FILE %/pbr/biconfig/940/Lev1/Web/Logs/SASServer*/heaps/*.hprof red
noexist
It looks like you are using shell globbing here ('*') rather than a regex
pattern for any characters ('.*').


John.

--
John Horne | Senior Operations Analyst | Technology and Information Services
University of Plymouth | Drake Circus | Plymouth | Devon | PL4 8AA | UK
[http://www.plymouth.ac.uk/images/email_footer.gif]<http://www.plymouth.ac.uk/worldclass>;

This email and any files with it are confidential and intended solely for the use of the recipient to whom it is addressed. If you are not the intended recipient then copying, distribution or other use of the information contained is strictly prohibited and you should not rely on it. If you have received this email in error please let the sender know immediately and delete it from your system(s). Internet emails are not necessarily secure. While we take every care, University of Plymouth accepts no responsibility for viruses and it is your responsibility to scan emails and their attachments. University of Plymouth does not accept responsibility for any changes made after it was sent. Nothing in this email or its attachments constitutes an order for goods or services unless accompanied by an official order form.
list Galen Johnson · Wed, 3 Oct 2018 09:25:37 -0400 ·
That did the trick.  I hadn't even considered that the different regex
blobbing would affect it.  You da man.

And for completeness since Torsten commented, it appears to be case
insensitive in that regard as I tried both upper and lower case.  To be
fair, the documentation is unclear on that point and if you look at the
code, it's comparing lowercase so I'm guessing there is a call somewhere
that lowcases the entry.

=G=
quoted from John Horne

On Wed, Oct 3, 2018 at 7:20 AM John Horne <user-e95f1ec2f147@xymon.invalid> wrote:
On Tue, 2018-10-02 at 20:37 -0400, Galen Johnson wrote:
HOST=%(odamid0).*
       FILE %/pbr/biconfig/940/Lev1/Web/Logs/SASServer*/heaps/*.hprof red
noexist
It looks like you are using shell globbing here ('*') rather than a regex
pattern for any characters ('.*').


John.

--
John Horne | Senior Operations Analyst | Technology and Information
Services
University of Plymouth | Drake Circus | Plymouth | Devon | PL4 8AA | UK

[http://www.plymouth.ac.uk/images/email_footer.gif]<;
http://www.plymouth.ac.uk/worldclass>;
quoted from John Horne

This email and any files with it are confidential and intended solely for
the use of the recipient to whom it is addressed. If you are not the
intended recipient then copying, distribution or other use of the
information contained is strictly prohibited and you should not rely on it.
If you have received this email in error please let the sender know
immediately and delete it from your system(s). Internet emails are not
necessarily secure. While we take every care, University of Plymouth
accepts no responsibility for viruses and it is your responsibility to scan
emails and their attachments. University of Plymouth does not accept
responsibility for any changes made after it was sent. Nothing in this
email or its attachments constitutes an order for goods or services unless
accompanied by an official order form.