Xymon Mailing List Archive search

Windows load triggering only on default settings?

8 messages in this thread

list Hermann-Josef Beckers · Thu, 8 Dec 2011 09:04:42 +0100 ·
I can't get xymon to use the defined load settings for named hosts. It only
reacts on the  settings from the DEFAULT section.


part of analysis.cfg:

...
HOST=%ssnts.*,sspro01     TIME=W:0600:1800
     LOAD 60  80
     PROC %.*.EXE  TRACK=Programme

...
# These are the built-in defaults.
DEFAULT
UP      1h
LOAD    15  25
DISK    * 90 95
SWAP    50 80
MEMPHYS 100 101
MEMSWAP 50 80
MEMACT  90 97


client data for SSPRO01 as reported by bbwin 0.12:

[collector:]
client SSPRO01.bbwin win32
[date]
Wed Dec 07 16:45:46 2011
[clock]
epoch: 1323272746
local: Wed Dec 07 16:45:46 2011
UTC: Wed Dec 07 15:45:46 2011
[osversion]
Microsoft Windows Server 2003 R2, Standard x64 Edition Service Pack 2 (build 3790)
[cpu]
up: 0 days, 0 users, 45 procs, load=17%


CPU states:      total  17%
          cpu00  16.1%
....

In this case the display goes to yellow because "17%" is between the default values 15 and 25.
I've tried to add a percent sign to the host load definitions but that doesn't change anything. I hope the syntax for the HOST directive is right?

Yours
hjb
list Henrik Størner · Thu, 08 Dec 2011 10:26:47 +0100 ·
quoted from Hermann-Josef Beckers
On 08-12-2011 09:04, Hermann-Josef Beckers wrote:
I can't get xymon to use the defined load settings for named hosts. It only
reacts on the settings from the DEFAULT section.


part of analysis.cfg:

...
HOST=%ssnts.*,sspro01 TIME=W:0600:1800
You are trying to mix regular expressions with host lists - I am quite 
sure you don't have any hosts with a comma in the hostname.

"HOST=%ssnts.*|sspro01" should do the trick.


Regards,
Henrik
list Hermann-Josef Beckers · Thu, 8 Dec 2011 13:47:11 +0100 ·
xymon-bounces at xymon.com schrieb am 08.12.2011 10:26:47:

...
Re: [Xymon] Windows load triggering only on default settings?

Gesendet von:
quoted from Hermann-Josef Beckers


On 08-12-2011 09:04, Hermann-Josef Beckers wrote:
I can't get xymon to use the defined load settings for named hosts. It 
only
reacts on the settings from the DEFAULT section.


part of analysis.cfg:

...
HOST=%ssnts.*,sspro01 TIME=W:0600:1800
You are trying to mix regular expressions with host lists - I am quite sure you don't have any hosts with a comma in the hostname.

"HOST=%ssnts.*|sspro01" should do the trick.
No change. BTW: I think you meant HOST="%ssnts.*|sspro01" (qoutation mark after the equalsign ?). But it makes no difference. I even seperated both entries
on extra lines with no variable substition. The only change happened after
upping the DEFAULT values. 
Is there a way to debug which rules are applied?

Yours
Hermann-Josef
list Henrik Størner · Thu, 08 Dec 2011 14:22:07 +0100 ·
On Thu, 8 Dec 2011 13:47:11 +0100, "Hermann-Josef Beckers"
quoted from Hermann-Josef Beckers
<user-3e5362deca72@xymon.invalid> wrote:
HOST=%ssnts.*,sspro01 TIME=W:0600:1800
You are trying to mix regular expressions with host lists - I am quite 
sure you don't have any hosts with a comma in the hostname.

"HOST=%ssnts.*|sspro01" should do the trick.
No change. BTW: I think you meant HOST="%ssnts.*|sspro01" (qoutation
mark 
after 
the equalsign ?). But it makes no difference. I even seperated both 
entries
on extra lines with no variable substition. The only change happened
after
upping the DEFAULT values. 
Make sure you have the DEFAULT section at the end of the analysis.cfg
file. If you have it before the HOST-specific entries, they will be
ignored.
Is there a way to debug which rules are applied?
$ xymoncmd xymond_client --test
2011-12-08 14:18:27 Using default environment file
/usr/lib/xymon/client/etc/xymonserver.cfg
Hostname (.=end, ?=dump, !=reload) []: jorn.hswn.dk
Hosttype []:
Test (cpu, mem, disk, proc, log, port): cpu
Load: Yellow at 5.00, red at 10.00
Uptime: yellow from boot until 1h ,and after  uptime


Regards,
Henrik
list Hermann-Josef Beckers · Thu, 8 Dec 2011 14:41:50 +0100 ·
xymon-bounces at xymon.com schrieb am 08.12.2011 14:22:07:
Von:

<user-ce4a2c883f75@xymon.invalid>

An:

<xymon at xymon.com>

Datum:

08.12.2011 14:21

Betreff:

Re: [Xymon] Antwort: Re: Windows load triggering only on default 
quoted from Henrik Størner
settings?

Gesendet von:


On Thu, 8 Dec 2011 13:47:11 +0100, "Hermann-Josef Beckers"
<user-3e5362deca72@xymon.invalid> wrote:
HOST=%ssnts.*,sspro01 TIME=W:0600:1800
You are trying to mix regular expressions with host lists - I am 
quite 
sure you don't have any hosts with a comma in the hostname.

"HOST=%ssnts.*|sspro01" should do the trick.
No change. BTW: I think you meant HOST="%ssnts.*|sspro01" (qoutation
mark 
after 
the equalsign ?). But it makes no difference. I even seperated both 
entries
on extra lines with no variable substition. The only change happened
after
upping the DEFAULT values. 
Make sure you have the DEFAULT section at the end of the analysis.cfg
file. If you have it before the HOST-specific entries, they will be
ignored.
Is there a way to debug which rules are applied?
...

see the following typescript:


Script wurde gestartet: Do 08 Dez 2011 14:27:06 CET
xymon at lscopy02:~/server/etc> tail -15 analysis.cfg
# Rules are evaluated from the top of this file and down, and the first
# matching rule is used. So you should put the specific rules first, and
# the generic rules last.

# These are the built-in defaults.
DEFAULT
UP      1h
#LOAD    15  25
LOAD    50  75
quoted from Hermann-Josef Beckers
DISK    * 90 95
SWAP    50 80
MEMPHYS 100 101
MEMSWAP 50 80
MEMACT  90 97

xymon at lscopy02:~/server/etc> cd ../bin
xymon at lscopy02:~/server/bin> xymoncmd xymond_client --test
2011-12-08 14:27:42 Using default environment file 
/home/xymon/server/etc/xymonserver.cfg
Hostname (.=end, ?=dump, !=reload) []: ssnts1
Hosttype []: 
Test (cpu, mem, disk, proc, log, port): cpu
Load: Yellow at 50.00, red at 75.00
Uptime: From boot until 1h ,and after  uptime
Hostname (.=end, ?=dump, !=reload) [ssnts1]: ssnts2
Hosttype []: 
Test (cpu, mem, disk, proc, log, port): cpu
Load: Yellow at 50.00, red at 75.00
Uptime: From boot until 1h ,and after  uptime
Hostname (.=end, ?=dump, !=reload) [ssnts2]: sspro01
Hosttype []: 
Test (cpu, mem, disk, proc, log, port): cpu
Load: Yellow at 50.00, red at 75.00
Uptime: From boot until 1h ,and after  uptime
Hostname (.=end, ?=dump, !=reload) [sspro01]: .
xymon at lscopy02:~/server/bin> cd -
/home/xymon/server/etc
xymon at lscopy02:~/server/etc> grep -i load analysis.cfg
#    LOAD   : Changes the "cpu" status according to the system load.
#    LOAD warnlevel paniclevel
#             If the system load exceeds "warnlevel" or "paniclevel", the 
"cpu"
     LOAD 60.0  80.0
     LOAD 60.0  80.0
     LOAD 60  80
#     LOAD 60  80
#    LOAD 8.0 12.0  HOST=db.foo.com TIME=*:0800:1600
#       LOAD 8.0 12.0
#       LOAD 7.0 12.0 HOST=bax.foo.com
#       LOAD 3.0 8.0
# will result in the load-limits being 7.0/12.0 for the "bax.foo.com" 
host,
#LOAD    15  25
LOAD    50  75
xymon at lscopy02:~/server/etc> exit
exit

Script beendet: Do 08 Dez 2011 14:28:49 CET
list Hermann-Josef Beckers · Thu, 8 Dec 2011 15:11:47 +0100 ·
<user-ce4a2c883f75@xymon.invalid> schrieb am 08.12.2011 14:48:38:

...
Re: [Xymon] Antwort: Re: Windows load triggering only on default 
settings?

Hi,

could you send me (private mail - user-ce4a2c883f75@xymon.invalid) the analysis.cfg file? 
I
would like to know exactly what is going on and having the file to test
would make it much easier.
Done.
Regards,
Henrik

PS: Please don't CC your mailing-list mails to "xymon-bounces", it just
fills my mailbox with "Uncaught bounce notifications".
Sorry.

Yours
hjb
list Henrik Størner · Thu, 08 Dec 2011 15:53:51 +0100 ·
On Thu, 8 Dec 2011 15:11:47 +0100, "Hermann-Josef Beckers"
<user-3e5362deca72@xymon.invalid> wrote:
<user-ce4a2c883f75@xymon.invalid> schrieb am 08.12.2011 14:48:38:
quoted from Hermann-Josef Beckers
could you send me (private mail - user-ce4a2c883f75@xymon.invalid) the analysis.cfg
file? I
would like to know exactly what is going on and having the file to test
would make it much easier.
Done.
The problem turned out to be some confusion about the regular expressions,
in combination with a rule that would unexpectedly take precedence over the
wanted one. When using regex'es, you must be careful about the order in
which you list the various rules. In this case there was 

  HOST=%ss
     LOAD ...

followed by

  HOST=%ssnts|sspro
     LOAD ...

and since Xymon uses the first rule that matches, the "%ssnts|sspro"
expression would never be used.


Regards,
Henrik
list Hermann-Josef Beckers · Fri, 9 Dec 2011 08:12:36 +0100 ·
xymon-bounces at xymon.com schrieb am 08.12.2011 15:53:51:
quoted from Henrik Størner

...
Re: [Xymon] Windows load triggering only on default settings?

Gesendet von:


On Thu, 8 Dec 2011 15:11:47 +0100, "Hermann-Josef Beckers"
<user-3e5362deca72@xymon.invalid> wrote:
<user-ce4a2c883f75@xymon.invalid> schrieb am 08.12.2011 14:48:38:
could you send me (private mail - user-ce4a2c883f75@xymon.invalid) the analysis.cfg
file? I
would like to know exactly what is going on and having the file to 
test
would make it much easier.
Done.
The problem turned out to be some confusion about the regular 
expressions,
in combination with a rule that would unexpectedly take precedence over 
the
wanted one. When using regex'es, you must be careful about the order in
which you list the various rules. In this case there was 
  HOST=%ss
     LOAD ...

followed by

  HOST=%ssnts|sspro
     LOAD ...

and since Xymon uses the first rule that matches, the "%ssnts|sspro"
expression would never be used.
Works as designed. Thanks, Henrik.


Hermann-Josef Beckers