[xymon] hobbit-clients.cfg, regex and IGNORE

Ryan Novosielski novosirj at umdnj.edu
Fri Dec 24 09:23:17 CET 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/24/2010 01:54 AM, Stef Coene wrote:
> On Friday 24 December 2010, Ryan Novosielski wrote:
>> Hi all,
>>
>> Was hoping someone could help me understand how these definitions in
>> hobbit-clients.cfg:
>>
>> 	DISK    %^/a    IGNORE
>>         DISK    %^/a/.* IGNORE
>>
>> ...excluded these filesystems in the disk test:
>>
>> njmsa/AppArchive        10G   8.2G   1.8G    83%    /AppArchive
>> /dev/md/dsk/d101       1.9G   1.3G   631M    68%    /apps_marcy
>> /dev/md/dsk/d103       1.9G   1.3G   476M    74%    /apps
>>
>> What I'm trying to exclude are filesystems /a and /a/* (like /a/var,
>> /a/usr, etc.).
>>
>> Hopefully someone's regex-fu is superior to mine. Thanks in advance!
> For /a, you can try:
> DISK    %^/a$    IGNORE
> 
> Also try to install txt2reg.  This is a command line utility to build up 
> regular expressions.

I had since tried that and it didn't work, so I commented the whole set
out. When you wrote this, I added it back in that way and it appears to
work now at least, so thanks. :)

Incidentally, I discovered in the docs why it matched /AppArchive:

Note that Xymon defaults to case-insensitive pattern matching; if that
is not what you want, put "(?-i)" between the "%" and the regular
expression to turn this off. E.g. "%(?-i)HTTPD" will match the word
HTTPD only when it is upper-case.

...it actually only mentions this when talking about the process list
and the logfile scanner, but I'm going to assume it applies for all
regular expressions in that file.

- -- 
- ---- _  _ _  _ ___  _  _  _
|Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Sr. Systems Programmer
|$&| |__| |  | |__/ | \| _| |novosirj at umdnj.edu - 973/972.0922 (2-0922)
\__/ Univ. of Med. and Dent.|IST/CST-Academic Svcs. - ADMC 450, Newark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk0UWHUACgkQmb+gadEcsb4M5QCgo8Lbh1Azyn+B+a1GSLhlX10D
onwAoMufF8/Z6bHmdM1XUUnxtMLneFR7
=4dUt
-----END PGP SIGNATURE-----


More information about the Xymon mailing list