<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4611.1300" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2>For something as limiting as SMS/pager, you might want to start with
something like:</FONT></SPAN></DIV>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2>For host outages:</FONT></SPAN></DIV>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2> grep HOST status.log | grep CRITICAL | wc
-l</FONT></SPAN></DIV>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2>For service outages:</FONT></SPAN></DIV>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2> grep SERVICE status.log | grep CRITICAL | wc
-l<BR></FONT></SPAN></DIV>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2>Massage in some formatting, and you could end up with output similar
to:</FONT></SPAN></DIV>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2> Hosts up: 165 down:30<BR> Services up: 1419
down: 155</FONT></SPAN></DIV>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2> </DIV></FONT></SPAN>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2>Food for thought.</FONT></SPAN></DIV>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=887025722-11122002><FONT face="Comic Sans MS" color=#000080
size=2>jc</DIV></FONT></SPAN>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Jon Lyons
[mailto:jlyons30@yahoo.com]<BR><B>Sent:</B> Wednesday, December 11, 2002 4:13
PM<BR><B>To:</B> nagios-users@lists.sourceforge.net<BR><B>Subject:</B>
[Nagios-users] Host/Service Status Totals via SMS/pager?<BR><BR></FONT></DIV>
<P>Hi,
<P>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)
<P>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).....
<P> </P>
<P><BR>
<HR SIZE=1>
Do you Yahoo!?<BR><A
href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Yahoo! Mail
Plus</A> - Powerful. Affordable. <A
href="http://rd.yahoo.com/mail/mailsig/*http://mailplus.yahoo.com">Sign up
now</A></BLOCKQUOTE></BODY></HTML>