[Xymon] Purple alerts

Gore, David W (David) david.gore at verizon.com
Sat Dec 10 15:01:35 CET 2011


I created a script that I call a heartbeat check.  It is based on this query:

   $serverDate = `$XYMON localhost "clientlog $server section=date"`;

Just check the date of the last message from the client and alert as appropriate.  I use this query to get my configured hosts:

   my $XYMONHOSTGREP = "$XYMONHOME/bin/xymongrep hb";  # retrieve all hosts with the 'hb'tag in hosts.cfg

And I use this config file for exceptions:

# default hb time is 600 seconds or 10 minutes
# configure exceptions here
#
#server|max heartbeat time (seconds)
somehost29|900
somehost30|900

I do not know if I could share the script without consulting the corporate policy since they effectively paid and own my work.  


~David

From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Ralph Mitchell
Sent: Friday, December 09, 2011 13:18
To: Xymon Mailing List
Subject: Re: [Xymon] Purple alerts

And once again my reply didn't go to the list...

On Fri, Dec 9, 2011 at 6:22 AM, Neil Simmonds <Neil.Simmonds at express-gifts.co.uk> wrote:
Hi, I'd like to be able to have more control over purple alerts. I know Henrik has added a new parm into xymonserver.cfg called STATUSLIFETIME but that seems to be a global parm.
 
What I'd really like to do is reduce the purple time for devmon to 5 minutes less than the global. This would enable me to detect devmon going purple and trigger the restart script without having all the snmp monitored devices (we have about 10) going purple as well.
 


Dunno about devmon specifically, but in general a test script "does stuff" to discover the state of the target device/service, then constructs a message that looks something like:

     "status $MACHINE.$TEST $COLOR `date`
       yadda yadda yadda
       other informational bits, etc, and so on"

then sends that message to the xymon server.  The default lifetime of a status message is 30 minutes, which you can change by appending a time to the word "status".

     "status+15 thing,domain,co,uk.test green `date`"

to get a 15 minute lifetime.  You ought to be able to locate that part in devmon and make an appropriate adjustment.  Or maybe there's already something in devmon for setting the message lifetime, but I don't use it so I don't know.

This is described in the "XYMON MESSAGE SYNTAX" section in the xymon.1 man page.

 Ralph Mitchell



More information about the Xymon mailing list