<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=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@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:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
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-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></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-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi all,<br>
<br>
Im at my wits end.<br>
Spent 2 days now trying to get Nagios to SMS me through gnokii but a lunar eclipse is a more frequent event!<br>
<br>
So i have Ubuntu 11.04 installed using postfix to email me alerts (works flawlessly)<br>
<br>
Now i also want a text message as a failover incase my Exchange server or internet line goes down.<br>
<br>
I have installed and configured gnokii to what i think is at a functioning level.<br>
I have a Nokia 6301 mobile hooked up to Ubuntu via USB cable.<br>
<br>
I can send a text message out through the phone via the CLI no issue at all with both my admin user logged in and also when i log in as the nagios user so i know i have the correct permissions on the ttyACM0 port that is assigned to the 6301.<br>
<br>
Will Nagios send an SMS - will it f*£$!!<br>
<br>
Here is my command.cfg relevant part<br>
<br>
<b><span style="color:red"># 'notify-host-by-sms' command definition<br>
define command{<br>
command_name notify-host-by-sms<br>
command_line /usr/bin/printf "%.120s" "***** Nagios ***** $NOTIFICATIONTYPE$: Host $HOSTALIAS$ is $HOSTSTATE$ | /usr/bin/gnokii --sendsms $CONTACTPAGER$
<br>
}<br>
<br>
# 'notify-service-by-sms' command definition<br>
define command{<br>
command_name notify-service-by-sms<br>
command_line /usr/bin/printf "%.120" "***** Nagios ***** $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ | /usr/bin/gnokii --sendsms $CONTACTPAGER$
<br>
}</span></b><br>
<br>
<br>
Here is my contact.cfg<br>
<br>
<b><span style="color:red">define contact{<br>
contact_name MYNAME <br>
use generic-contact <br>
alias MYNAME <br>
host_notification_options d,u,r,f<br>
service_notification_options w,u,c,r,f<br>
email MYEMAIL <br>
pager +44XXXXXXXXX <br>
host_notification_period 24x7<br>
service_notification_period 24x7<br>
host_notification_commands notify-host-by-email,notify-host-by-sms<br>
service_notification_commands notify-service-by-email,notify-service-by-sms</span></b><br>
<br>
Here is my templates.cfg<br>
<br>
<b><span style="color:red">define contact{<br>
name generic-contact <br>
service_notification_period 24x7 <br>
host_notification_period 24x7 <br>
service_notification_options w,u,c,r,f,s <br>
host_notification_options d,u,r,f,s <br>
service_notification_commands notify-service-by-email, notify-service-by-sms <br>
host_notification_commands notify-host-by-email, notify-host-by-sms <br>
register 0 <br>
}</span></b><br>
<br>
what can be going on – why will nagios not SMS me? Its got to be a nagios config issue and not gnokii error as I can send text through CLI fine,<br>
<br>
Please help me, im going insane<br>
<br>
Thanks<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-GB">Kind Regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-GB">Andrew<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-GB">T: 01386 834000<br>
F: 01386 834100<br>
<br>
<u><o:p></o:p></u></span></p>
<p class="MsoNormal"><u><span lang="EN-US" style="mso-fareast-language:EN-GB"><a href="mailto:Andrew@fulgent.co.uk"><span style="color:blue">Andrew@fulgent.co.uk</span></a></span></u><span lang="EN-US" style="mso-fareast-language:EN-GB"><br>
<a href="http://www.fulgent.co.uk/" title="http://www.fulgent.co.uk/"><span style="color:blue">www.fulgent.co.uk</span></a>
</span><span style="mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:EN-GB"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-GB"><br>
Fulgent Technologies Limited, Haddonsacre, Station Road, Offenham, Evesham, WR11 8JJ. This communication contains information which is confidential and may also be privileged or protected by copyright. It is for the exclusive use of the addressee. If you are
 not the addressee please note that any distribution, reproduction, copying, publication or use of this communication or the information is prohibited. If you have received this communication in error, please telephone us immediately and also delete the communication
 from your computer.</span><span style="mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>