Xymon Mailing List Archive search

Issue with Regex and NORRDDISKS Setting

list Matt Vander Werf
Wed, 2 Mar 2016 14:23:15 -0500
Message-Id: <user-65395f9b087e@xymon.invalid>

Hi J.C.,

It doesn't seem to be working with or without the escape backslash. It
doesn't show up in the env output either way.

root@<host> ~]# grep NORRDDISK /etc/xymon/xymonserver.cfg
NORRDDISKS="^/dev|^/var|^/tmp$"
[root@<host> ~]# xymoncmd env | grep NORRD
2016-03-02 14:18:47.151545 xgetenv: Cannot find value for variable
NORRDDISKS=^/dev|^/var|^/tmp

[root@<host> ~]# grep NORRDDISK /etc/xymon/xymonserver.cfg
NORRDDISKS="^/dev|^/var|^/tmp\$"
[root@<host> ~]# xymoncmd env | grep NORRD
2016-03-02 14:17:47.233910 xgetenv: Cannot find value for variable
NORRDDISKS=^/dev|^/var|^/tmp


When I do it with them grouped together, it gives me the same result:

[root@<host> ~]# grep NORRDDISK /etc/xymon/xymonserver.cfg
NORRDDISKS="^(/dev|/var|/tmp)$"
[root@<host> ~]# xymoncmd env | grep NORRD
2016-03-02 14:20:35.984507 xgetenv: Cannot find value for variable
NORRDDISKS=^(/dev|/var|/tmp)

Any ideas?

Thanks!!

--
Matt Vander Werf

On Wed, Mar 2, 2016 at 11:50 AM, J.C. Cleaver <user-87556346d4af@xymon.invalid>
wrote:
On Wed, March 2, 2016 8:31 am, Matt Vander Werf wrote:
Hello,

Looking at past list e-mails, it is my understanding that the NORRDDISKS
setting in xymonserver.cfg allows for PCRE regular expressions. Is this
correct? Or does it only allow certain PCRE regular expressions, but not
everything?

I ask because I'm experiencing an issue with my NORRDDISKS setting.

I'd like to ignore disks for graphing that have mount points "/tmp", but
not ignore disks with mount points that have "tmp" in them, like
"/tmpscratch".

I noticed that for other disk mount point names that if you just use
"^/<name>" with no modifiers, then it only ignores disk mount points with
only exactly "^/<name>" and not "^/<name><additional text>" or
"^/<name>/<more name>" (at least from what I can tell).

For example when using:

NORRDDISKS="^/dev|^/tmp|^/var"

It ignores disks with mount points "/dev" and "/var", but also "/tmp" AND
"/tmpscratch". But it doesn't look like it ignores "/var/tmp" (at least
as
far as I can tell).

I tried using "^/tmp$" and that didn't work either (still ignored both
names).


Any idea what's going on here? Or how this can be done correctly? Is the
"$" metacharacter not allowed in this setting?


If it's needed, I'm running the latest 4.3.26-1 Terabithia RPM on RHEL 7.

Thanks for any help!!

--
Matt Vander Werf

Try checking the output of 'xymoncmd env | grep NORRD' ? If the '$' is not
coming through, it might be getting read in as an attempt at a shell
variable.

If so, can you try escaping it as \$ instead?

Alternatively: '^(/dev|/tmp|/var)$'


HTH,
-jc