Xymon Mailing List Archive search

custom paging script

list Dave Haertig
Thu, 3 Jan 2008 11:15:38 -0700
Message-Id: <user-cfb8e09139eb@xymon.invalid>

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 user-5e6ae95f74f9@xymon.invalid DURATION>10m
REPEAT=1d


From: Joshua Krause [mailto:user-41d3365fe380@xymon.invalid] 
Sent: Thursday, January 03, 2008 5:32 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] custom paging script


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