[Xymon] Receiving Duplicate Alerts

Jeremy Laidman jlaidman at rebel-it.com.au
Tue Jan 28 02:51:35 CET 2014


On 25 January 2014 00:49, Shackelford, Ken <ken.shackelford at siemens.com>wrote:

>  Hello,
>
>         I have a situation where I’m receiving duplicate alert E-mail for
> most of my monitored devices.
> For example, with the following configuration lines:
>
> $B-list-brn-emea=%(Ballerup-w
>

<snip>

$B-list-grn-emea=%(Ballerup-w-plnet
>


> Now, if, for example the device Ballerup-w-plnet goes red, I get two mails
> with identical headers:
>

Yes, "ballerup-w-plnet" matches both "ballerup-w" and "ballerup-w-plnet",
because it's a substring match.  You would also get a match on "ballerup-w"
for a hostname of "something-ballerup-w".  If you want it to match exactly,
you need to anchor it to the start and end of the string, using "^" for the
start, and "$" for the end.  For example:

$somelist=%^(host1|host2|host3)$

This means, in English, "start of string, immediately followed by one of
host1, host2, host3, immediately followed by end of string".

With your problem, you probably don't need anchoring to the start, because
the only ambiguity is at the end of the hostname ("ballerup-w" vs
"ballerup-w-plnet").  Nevertheless, to future-proof, you probably should
anchor to the start of the string.

$B-list-brn-emea=%^(Ballerup-w|Barcelona-w|Berlin-w|Bilbao-w|
Bonn-w|Capelle-w|CastlePark-w|Essen-w|Goeppingen-w|Hamburg-
w|Hannover-w|Hengelo-w|Huizingen-w|Kista-w|Klagenfurt-w|Leuven-LMS-w|
Lindau-w|Linz-w|Madrid-w|Manchester-w|Milano-w|Modena-
w|Molndal-w|Moscow-w|Munich-w|Nuernberg-w|Orbassano-w|
Prague-w|Rheinfelden-w|s-Hertogenbosch-w|Solihull-w|StPriest-w|Stuttgart-w|
Stuttgart-TCNO-w|Toulouse-w|ToulouseKineo-w|Treviso-w|
Vejle-w|Velizy-w|Warsaw-w|Wolfsburg-w|Zurich-w)$

and

$B-list-grn-emea=%^(Ballerup-w-plnet|Barcelona-w-plnet|
Bilbao-w-plnet|Bonn-w-plnet|CastlePark-w-plnet|Goeppingen-
w-plnet|Hamburg-w-plnet|Hannover-w-plnet|Hengelo-w-
plnet|Huizingen-w-plnet|Kista-w-plnet|Klagenfurt-w-plnet|
Linz-w-plnet|Madrid-w-plnet|Manchester-w-plnet|Milano-w-
plnet|Modena-w-plnet|Molndal-w-plnet|Moscow-w-plnet|Munich-
w-plnet|Nuernberg-w-plnet|Orbassano-w-plnet|Prague-w-
plnet|Rheinfelden-w-plnet|s-Hertogenbosch-w-plnet|
Solihull-w-plnet|StPriest-w-plnet|Stuttgart-w-plnet|Stuttgart-TCNO-w-plnet|
Toulouse-w-plnet|Treviso-w-plnet|Vejle-w-plnet|Velizy-w-
plnet|Warsaw-w-plnet|Wolfsburg-w-plnet|Zurich-w-plnet)$

Cheers
Jeremy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20140128/f4fd86f9/attachment.html>


More information about the Xymon mailing list