[Xymon] Issue with Regex and NORRDDISKS Setting
Matt Vander Werf
matt1299 at gmail.com
Wed Mar 2 20:23:15 CET 2016
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 <cleaver at terabithia.org>
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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20160302/0ea9dde1/attachment.html>
More information about the Xymon
mailing list