Host/Service Status Totals via SMS/pager?

Carroll, Jim P [Contractor] jcarro10 at sprintspectrum.com
Thu Dec 12 00:08:42 CET 2002


For something as limiting as SMS/pager, you might want to start with
something like:
 
For host outages:
   grep HOST status.log | grep CRITICAL | wc -l
 
For service outages:
   grep SERVICE status.log | grep CRITICAL | wc -l

Massage in some formatting, and you could end up with output similar to:
 
   Hosts up: 165 down:30
   Services up: 1419 down: 155
 
Anything more detailed than that, you might want to parse out the
hosts/services and report on those.  The risk of this approach is that for
any non-trivial number of outages (hosts or services) in a given report, you
could quickly end up surpassing the message limit defined for SMS/pager.
(If you don't mind multiple messages, you could write a perl script to chop
the message up into multiple messages which satisfy the limit issue, and
send them out, one after the other.  Then instead of having a truncated
message, you end up with several (tens?  hundreds?) of messages until that
one report cycle is complete.  Then 5 minutes (more or less) after the
current cycle of messages started, you might be able to expect the same
volley of messages to hit (or be queued up for) your SMS device or pager.
You might see that while it's technically feasible, your happiness quotient
might end up dropping dramatically.
 
Food for thought.
 
jc

-----Original Message-----
From: Jon Lyons [mailto:jlyons30 at yahoo.com]
Sent: Wednesday, December 11, 2002 4:13 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Host/Service Status Totals via SMS/pager?



Hi,  


Anyone have any suggestions on how I can get the Host & Service status
totals(The small tables at the top of service problems) and a list of the
hosts/services in a critical state in a plain text format? (ie..Up 165 Down
30) 


I've written 2 scripts that allow me to acknowledge host/service problems
via my Nextel phone, it'd be great if I could get a simple quick stats of
all hosts/services.....(I have VERY basic perl skills)..... 


 




  _____  

Do you Yahoo!?
Yahoo! Mail  <http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com>
Plus - Powerful. Affordable. Sign up
<http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com> now

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20021211/e356e558/attachment.html>


More information about the Users mailing list