Xymon Mailing List Archive search

leaking memory, alerts.cfg problems

list Jeremy Laidman
Thu, 11 Sep 2014 11:57:49 +1000
Message-Id: <user-9e432627bb38@xymon.invalid>

On 11 September 2014 01:50, Tres Finocchiaro <user-88678e65ced1@xymon.invalid>
wrote:
Fantastic, that gets me further.  So it appears to be breaking on my
Perl-compatible percent-asterisk (%*) in the alert.cfg.  Apparently my
wildcard is invalid.
That's because "%*" is invalid.  The "%" means what follows is a
perl-compatible regular expression (PCRE).  An asterisk in a PCRE means
"zero or more of the preceding symbol".  If there's no preceding symbol,
then the PCRE is invalid.  What you probably mean is "%.*", where the dot
means "any character" and so ".*" means "zero or more of any character".

I change the line from *HOST=%** to *HOST=** and alerts are working great.
This works because you're no longer using an RE, but are matching due to a
special case in the host-matching code, where an asterisk means to match
everything.  But the effect is the same as if you did "%.*".

Should I use *HOST=**, is this the recommended method?  I would assume the
alert.cfg to have a basic example for "all hosts" but the best I could find
was the Perl example.
Given that "HOST=*" is an undocumented feature, and that it looks like a
glob pattern but isn't, I would recommend you use "HOST=%.*".

J