[hobbit] custom paging script

Haertig, David F (Dave) haertig at avaya.com
Thu Jan 3 19:15:38 CET 2008


Here's what I use for short, concise alerts:
 
#!/bin/perl
# RCS $Id: brief_alert,v 1.2 2007/06/09 18:09:39 hobbit Exp $
use strict;
my $Subject = "Hobbit Alert! \u$ENV{BBCOLORLEVEL} light :
$ENV{BBSVCNAME} : $ENV{BBHOSTNAME}";
my $Body = "Hobbit Monitoring Alert!\n\nA \u$ENV{BBCOLORLEVEL} light
condition has been detected for SERVICE=$ENV{BBSVCNAME} on
HOST=$ENV{BBHOSTNAME}";
SendMail($Subject, $Body);
sub SendMail {
        my($Subject, $Body) = @_;
        open( MAIL, '| /usr/lib/sendmail -F "Hobbit" -t');
        print MAIL  "To: $ENV{RCPT}\n";
        print MAIL  "Subject: $Subject\n\n" if defined $Subject;
        print MAIL  "$Body\n" if defined $Body;
        close(MAIL);
}

Called like this (example) from hobbit-alerts.cfg:
 
$BRIEF_ALERT=/development/hobbit/server/ext/brief_alert
HOST=servername SERVICE=http COLOR=red
        SCRIPT $BRIEF_ALERT recipient at mycompany.com DURATION>10m
REPEAT=1d


________________________________

From: Joshua Krause [mailto:forums at triadbiz.rr.com] 
Sent: Thursday, January 03, 2008 5:32 AM
To: hobbit at hswn.dk
Subject: [hobbit] custom paging script



Has anyone come up with a custom paging script that will only page out
certain information? 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20080103/15bd4857/attachment.html>


More information about the Xymon mailing list