Xymon Mailing List Archive search

hobbit-clients.cfg, regex and IGNORE

3 messages in this thread

list Ryan Novosielski · Fri, 24 Dec 2010 01:10:04 -0500 ·
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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!

- -- 
- ---- _  _ _  _ ___  _  _  _
|Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Sr. Systems Programmer
|$&| |__| |  | |__/ | \| _| |user-ae4522577e16@xymon.invalid - 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/

iEYEARECAAYFAk0UOTwACgkQmb+gadEcsb6G0QCgnAWWD81FYqdMrHw3cCoqOOYd
0T4AoJCNRINzW0DX/tHFkXKfXi5NxJzC
=6Yn9
-----END PGP SIGNATURE-----
list Stef Coene · Fri, 24 Dec 2010 07:54:22 +0100 ·
quoted from Ryan Novosielski
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.


Stef
list Ryan Novosielski · Fri, 24 Dec 2010 03:23:17 -0500 ·
quoted from Stef Coene
-----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.
quoted from Ryan Novosielski

- -- 
- ---- _  _ _  _ ___  _  _  _
|Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Sr. Systems Programmer
|$&| |__| |  | |__/ | \| _| |user-ae4522577e16@xymon.invalid - 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-----