Xymon Mailing List Archive search

DISPLAYGROUP in analysis.cfg

list John Thurston
Thu, 17 Oct 2019 06:58:14 -0800
Message-Id: <user-b7adf1877de4@xymon.invalid>

And with more testing, DISPLAYGROUP doesn't seem to work at all.

Group names containing spaces, so enclosed in double-quotes, are shown in the --dump with the leading quote and not the trailing quote.

Group names with only one word appear in the --dump correctly, but are not matched when performing a --test.

The behavior is the same when I use a regex in place of the quoted group name containing spaces.

The only way I can make my analysis.cfg file work is by creating wicked regex definitions of the type HOST


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

John Thurston    XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Department of Administration
State of Alaska

On 10/16/2019 10:51 AM, John Thurston wrote:
I'm seeing very odd behavior with my analysis.cfg*. My xymon server is running 4.3.28 on Solaris 10.

What I'm seeing is that trying to define a rule with DISPLAYGROUP (or EXDISPLAYGROUP) does not behave as expected from the man-page.

If I have the following in my analysis.cfg:
disk /charlie 23 33 DISPLAYGROUP=Charlie

DISPLAYGROUP=Delta
??????? disk? /delta 24 34

PAGE=Foo
??????? disk /foo 10 20

I get the following from???? xymond_client --dump-config
DISK /charlie 23% 33% 0 -1 red DISPLAYGROUP=Charlie (line: 373)
DISK /delta 24% 34% 0 -1 red (line: 376)
DISK /foo 10% 20% 0 -1 red PAGE=Foo (line: 379)
UP 3600 -1 (line: 385)
LOAD 20.00 60.00 (line: 386)
DISK * 90% 95% 0 -1 red (line: 387)
INODE * 70% 90% 0 -1 red (line: 388)
MEMREAL 100 101 (line: 389)
MEMSWAP 50 80 (line: 390)
MEMACT 90 97 (line: 391)

Demonstrating that DISPLAYGROUP works when appended to a setting, but does _not_ work when preceding a line with a setting.? The DISK setting is accepted, but becomes a global value rather than applying to a subset of the hosts. Yet the PAGE rule does work.

I have run through many scenarios, and see that the following DO work as rules preceding a setting:
 ? HOST
 ? EXHOST
 ? PAGE
 ? EXPAGE
 ? CLASS
 ? EXCLASS
 ? TEXT
 ? TIME
 ? EXTIME
and that the following DO NOT work
 ? DISPLAYGROUP
 ? EXDISPLAYGROUP


I also see that order matters. If I move the PAGE=Foo up in the file:
PAGE=Foo
??????? disk /foo 10 20

disk /charlie 23 33 DISPLAYGROUP=Charlie

DISPLAYGROUP=Delta
??????? disk? /delta 24 34
then the resulting --dump-config reveals some strange parsing:
DISK /foo 10% 20% 0 -1 red PAGE=Foo (line: 374)
DISK /charlie 23% 33% 0 -1 red DISPLAYGROUP=Charlie PAGE=Foo (line: 376)
DISK /delta 24% 34% 0 -1 red (line: 379)
UP 3600 -1 (line: 386)
LOAD 20.00 60.00 (line: 387)
DISK * 90% 95% 0 -1 red (line: 388)
INODE * 70% 90% 0 -1 red (line: 389)
MEMREAL 100 101 (line: 390)
MEMSWAP 50 80 (line: 391)
MEMACT 90 97 (line: 392)

Can anyone help me figure out what's going on?
Do I have my analysis.cfg syntax all wrong?
Or is there a defect in the parsing?


* It's worth noting that I don't do much with that file. The majority of our clients are old Big Brother clients, so I seldom delve into this file.