[Xymon] Can anyone confirm unexpected behavior of DISPLAYGROUP in alerts.cfg ?

John Thurston john.thurston at alaska.gov
Fri Oct 11 03:08:31 CEST 2013


I see inconsistency between the documentation for the DISPLAYGROUP rule 
in alerts.cfg and the behavior of the rule.

In the alerts.cfg.5.html on my server (Updated: Version 4.3.12: 24 Jul 
2013) says:

> DISPLAYGROUP=groupstring Rule matching an alert by the text of the display-group (text following the group, group-only, group-except heading) in the hosts.cfg file. "groupstring" is the text for the group, stripped of any HTML tags.
> . . . . the database servers can be matched with DISPLAYGROUP="Production databases"


The first inconsistency is there is no mention of this rule in the 
xymon-alerts.html file. That's understandable as the xymon-alerts.html 
is probably an older file. But since this rule offers me significant 
business advantage, I went ahead and gave it a shot.

The real problem is that DISPLAYGROUP does not appear to handle spaces 
and double quotes as advertised. When I try to use the rule in my 
alert.cfg, my alert.log contains lines telling me of unknown tokens.

 From my hosts.cfg
> page ETS        ETS Enterprise
> title   Solaris Hosts
> subparent ETS   SolHostsAll     All
> group           Solaris T3 Servers
> 0.0.0.0         argon.example.com       # client:argon !ftp

 From my alerts.cfg
> DISPLAYGROUP="Solaris  T3 Servers"
>         MAIL foo at alaska.gov   REPEAT=1m SERVICE=ssh

Results in alert.log
> 2013-10-10 16:52:12 Ignored unknown/unexpected token 'T3' at line 130
> 2013-10-10 16:52:12 Ignored unknown/unexpected token 'Servers"' at line 130

If, however, I change the group name to be the single word "Solaris" 
(withoug quotes) and change the line in alerts.cfg to be:
   DISPLAYGROUP=Solaris
then it works without complaint.

It also works if I leave the original group name and change the line in 
alerts.cfg to use regex:
   DISPLAYGROUP=%Solaris[[:space:]]T3[[:space:]]Servers

Can anyone confirm this behavior?

It appears I can work around it with the regex, but it is going to make 
my alerts.cfg a lot more difficult to maintain and read.

fwiw, I am running my xymon server on Solaris 10 SPARC.

-- 
    Do things because you should, not just because you can.

John Thurston    907-465-8591
John.Thurston at alaska.gov
Enterprise Technology Services
Department of Administration
State of Alaska



More information about the Xymon mailing list