[Xymon] DISPLAYGROUP fails in analysis.cfg

Dave "doughnut" Fogarty doughnut at doughnut.net
Fri Feb 1 00:48:48 CET 2019


Looks like I just found my answer in the source code.  This is actually 
broken due to someone counting the number of characters incorrectly for a 
strncasecmp in client_config.c.  It's done correctly later in the same 
code.  This should be "13" and "15" where it's "12" and "14".


$ grep -n DISPLAYGROUP= client_config.c 
466:         (strncasecmp(token, "DISPLAYGROUP=", 12) == 0)     ||
467:         (strncasecmp(token, "EXDISPLAYGROUP=", 14) == 0)   ||
667:                    else if (strncasecmp(tok, "DISPLAYGROUP=", 13) == 0) {
673:                    else if (strncasecmp(tok, "EXDISPLAYGROUP=", 15) == 0) {
...


Dave


On Wed, 11 Jul 2018, Dave "doughnut" Fogarty wrote:

> I have a xymon server running "Debian GNU/Linux 9 (stretch)" with xymon 
> 4.3.28-2. I'm having bad luck getting DISPLAYGROUP to work in analysis.cfg. 
> It seems to only match on the first 7 characters.
>
> I also see this problem on "Debian GNU/Linux 8 (jessie)" with xymon 
> 4.3.17-6+deb8u1.
>
> Below, I've shown that the display group is set, and that the analysis.cfg 
> file is being parsed correctly by xymon, yet the the svcstatus page only 
> shows the shortest of the DISPLAYGROUP enabled lines.
>
>
> root at misc-ten105-test:/etc/xymon# egrep -H Testnet.Database.Servers hosts.cfg 
> hosts.cfg:group Testnet Database Servers
>
> root at misc-ten105-test:/etc/xymon# cat analysis.d/davetest.cfg HOST=* 
> EXCLASS=linux
>        PROC    davetest-nonlinux 1 150 yellow
>        PROC    davetest-Testnet.Database.Servers 1 150 yellow 
> DISPLAYGROUP=%(Testnet.Database.Servers)
>        PROC    davetest-Database 1 150 yellow DISPLAYGROUP=%(Database)
>        PROC    davetest-Databas 1 150 yellow DISPLAYGROUP=%(Databas)
>        PROC    davetest-Testnet.Database 1 150 yellow 
> DISPLAYGROUP=%(Testnet.Database)
>        PROC    davetest-Testnet.Data 1 150 yellow 
> DISPLAYGROUP=%(Testnet.Data)
>        PROC    davetest-Testnet.D 1 150 yellow DISPLAYGROUP=%(Testnet.D)
>        PROC    davetest-Testnet. 1 150 yellow DISPLAYGROUP=%(Testnet.)
>        PROC    davetest-Testnet 1 150 yellow DISPLAYGROUP=%(Testnet)
>        PROC    davetest-Testne 1 150 yellow DISPLAYGROUP=%(Testne)
>
>
> root at misc-ten105-test:/etc/xymon# sudo -u xymon xymoncmd xymond_client 
> --dump-config | grep davetest
> [...]
> PROC davetest-nonlinux 1 150 yellow HOST=* EXCLASS=linux (line: 375)
> PROC davetest-Testnet.Database.Servers 1 150 yellow HOST=* 
> DISPLAYGROUP=%(Testnet.Database.Servers) EXCLASS=linux (line: 377)
> PROC davetest-Database 1 150 yellow HOST=* DISPLAYGROUP=%(Database) 
> EXCLASS=linux (line: 378)
> PROC davetest-Databas 1 150 yellow HOST=* DISPLAYGROUP=%(Databas) 
> EXCLASS=linux (line: 379)
> PROC davetest-Testnet.Database 1 150 yellow HOST=* 
> DISPLAYGROUP=%(Testnet.Database) EXCLASS=linux (line: 380)
> PROC davetest-Testnet.Data 1 150 yellow HOST=* DISPLAYGROUP=%(Testnet.Data) 
> EXCLASS=linux (line: 381)
> PROC davetest-Testnet.D 1 150 yellow HOST=* DISPLAYGROUP=%(Testnet.D) 
> EXCLASS=linux (line: 382)
> PROC davetest-Testnet. 1 150 yellow HOST=* DISPLAYGROUP=%(Testnet.) 
> EXCLASS=linux (line: 383)
> PROC davetest-Testnet 1 150 yellow HOST=* DISPLAYGROUP=%(Testnet) 
> EXCLASS=linux (line: 384)
> PROC davetest-Testne 1 150 yellow HOST=* DISPLAYGROUP=%(Testne) EXCLASS=linux 
> (line: 385)
>
>
> root at misc-ten105-test:/etc/xymon# lynx -dump -nolist 
> 'http://localhost/xymon-cgi/svcstatus.sh?HOST=balin2012.collegenet.testnet&SERVICE=procs'
> [...]
>   Xymon
>
>                    balin2012.mydomain.testnet - procs
>
>   Wed Jul 11 13:29:40 2018
>   _______________________________________________________________________
>
>
>                                   HISTORY
>
>                 Wed Jul 11 13:29:40 2018 - Processes NOT ok
>
> yellow  davetest-nonlinux (found 0, req. between 1 and 150)
> yellow  davetest-Testnet (found 0, req. between 1 and 150)
> yellow  davetest-Testne (found 0, req. between 1 and 150)
>
>
>
>              Status unchanged in 8 days, 21 hours, 22 minutes
>                  Status message received from 10.101.1.35
>                            Client data available
>
>
>
>


More information about the Xymon mailing list