[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [hobbit] custom paging script
- To: <hobbit (at) hswn.dk>
- Subject: RE: [hobbit] custom paging script
- From: "Haertig, David F (Dave)" <haertig (at) avaya.com>
- Date: Thu, 3 Jan 2008 11:15:38 -0700
- References: <013101c84e04$971635b0$c542a110$ (at) rr.com>
- Thread-index: AchOBJZL5whYw1eYTb+CJP3r2kKFswALzgnQ
- Thread-topic: [hobbit] custom paging script
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?