<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>Hi All,<o:p></o:p></p>

<p class=MsoNormal>I am trying to get Nagios to send SMS through an SMS
webservice running on a Windows server.<o:p></o:p></p>

<p class=MsoNormal>I can send a message through curl for example so I know it
works ok.<o:p></o:p></p>

<p class=MsoNormal>For the moment, I just want to be able to send an SMS when a
host is no longer available/reachable.<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>I have been experimenting but it’s not working properly (or
sometimes not at all)<o:p></o:p></p>

<p class=MsoNormal>I suddenly got one notification by email over a one day
period but no SMS at all. <o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>Ultimately, I want to send both an email notification and an
SMS at the same time. Once I get it figured out, I would like to do the same
for defined services.<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>My modified 'notify-host-by-email' command is as follows:<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal># 'notify-host-by-email' command definition<o:p></o:p></p>

<p class=MsoNormal>define command{<o:p></o:p></p>

<p class=MsoNormal>       
command_name    notify-host-by-email<o:p></o:p></p>

<p class=MsoNormal>       
command_line    /usr/bin/printf "%b" "*****
Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost:
$HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time:
$LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" |
/usr/local/nagios/etc/celtelconfig/send-mail-sms-alerts.sh<o:p></o:p></p>

<p class=MsoNormal>        }<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>The sendsmsalerts.sh script is as follows:<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>#!/bin/sh<o:p></o:p></p>

<p class=MsoNormal># called by notify-host-by-email<o:p></o:p></p>

<p class=MsoNormal>read INPARAM<o:p></o:p></p>

<p class=MsoNormal>MESSAGE="appCode=Nagios&fromNumer=NAGIOS&toNumber=2348013556519&shortMessage=$INPARAM"<o:p></o:p></p>

<p class=MsoNormal>curl -d $MESSAGE
http://sms-server/smswebservice/smsservice.asmx/SendMessage<o:p></o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal><o:p> </o:p></p>

<p class=MsoNormal>a sample working curl message is of the form:<o:p></o:p></p>

<p class=MsoNormal>curl -d
"appCode=Nagios&fromNumer=NAGIOS&toNumber=2348013556519&shortMessage=Nagios
Calling at 1:41PM"
http://sms-server/smswebservice/smsservice.asmx/SendMessage<o:p></o:p></p>

</div>

DISCLAIMER: This email and any attachments are confidential and privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorized. If received in error, do not open, read, copy, disclose, use or store it in any way, or permit others to do so but please notify the sender immediately and delete the original email and attachments from your machine. If you are not the addressee or the intended recipient, any use, disclosure, copying, distribution or action taken in reliance of it, is prohibited and unlawful. The information, attachments, opinions or advice contained in this email are not necessarily the views or opinions of Celtel Nigeria Limited or its affiliates and without more, shall not commit Celtel Nigeria Limited or its affiliates. Celtel Nigeria Limited and its affiliates do not accept liability for claims, losses, or damages caused by the inaccuracy, incorrectness, or lack of integrity of this email or any attachments. <br></body>

</html>