Xymon Mailing List Archive search

Regular expressions

list Jeremy Laidman
Fri, 14 Jun 2013 14:25:03 +1000
Message-Id: <user-4c0546f3a0d3@xymon.invalid>

On 12 June 2013 09:21, David Baldwin <user-cbbf693f2c89@xymon.invalid> wrote:
I think it's all or nothing with regexp.

Yes, this.  Paraphrasing the man page for analysis.cfg, the target string
is exactly one of:
(a) comma-separated list of hostnames
(b) "*" to indicate "all hosts"
(c) a Perl-compatible regular expression

Pick one.  You're trying to mix these and it won't work.
HOST=%* EXHOST=%(iadjapa)ccmp.*,%stn380esx.*
This won't work because "*" is not a valid regular expression in the HOST=
part.  But the "%" should not be needed there because HOST=* matches item
(b).

David's example should work for you because it's one single regular
expression - item (c).

J