Posted by & filed under Server Admin.

If you want to test how your alert configuration handles a specific host, you can run xymond_alert in test mode – you give it a hostname and servicename as input, and it will go through the configuration and tell you which rules match and who gets an alert.

Xymon:

osiris:~ $ cd server/
osiris:~/server $ ./bin/xymoncmd xymond_alert –test osiris.hswn.dk cpu
Matching host:service:page ‘osiris.hswn.dk:cpu:’ against rule line 109:Matched
*** Match with ‘HOST=*’ ***
Matching host:service:page ‘osiris.hswn.dk:cpu:’ against rule line 110:Matched
*** Match with ‘MAIL henrik@sample.com REPEAT=2 RECOVERED COLOR=red’ ***
Mail alert with command ‘mail -s “XYmon [12345] osiris.hswn.dk:cpu is RED” henrik@sample.com

BigBrother is slightly different:
$ bbcmd hobbitd_alert –test ns2.whatever.net conn

Both can optionally be appended with a duration to meet any requirements:

dev@monitor:/usr/lib/hobbit/server/bin$ bbcmd hobbitd_alert --test ns2.whatever.net conn --duration=501
2011-07-08 10:37:05 Using default environment file /usr/lib/hobbit/client/etc/hobbitserver.cfg
00013395 2011-07-08 10:37:05 send_alert ns2.whatever.net:conn state Paging
00013395 2011-07-08 10:37:05 Matching host:service:page 'ns2.whatever.net:conn:' against rule line 26
00013395 2011-07-08 10:37:05 Failed 'HOST=$INTIDEAS' (hostname not in include list)
00013395 2011-07-08 10:37:05 Matching host:service:page 'ns2.whatever.net:conn:' against rule line 39
00013395 2011-07-08 10:37:05 *** Match with 'HOST=*' ***

The hobbitd_alert and xymond_alert (depending on if it is xymon or bb) command calls the module:


Update 07/25/18: The Xymon syntax is a bit off, it should be:

See www.xymon.com/xymon/help/manpages/man8/x… for additional details on the parameters.

One Response to “Kick off a test alert with Xymon”

Leave a Reply

You must be logged in to post a comment.