<!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.4930.1700" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=141554913-19052004>Jason,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=141554913-19052004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=141554913-19052004>To
avoid lots of replies, work step by step and try to document symptoms in
detail..</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=141554913-19052004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=141554913-19052004>1. Do
the command work manually as root ?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=141554913-19052004>2. Do
a su - nagios and try the command again. If it doesn't work. What is the error
message ?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=141554913-19052004>3. Do
you have read and write permissions on the serial port specified in the gnokiirc
file as the nagios user ?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=141554913-19052004>4.
correct is necessary.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=141554913-19052004>5. Is
there a getty process on it ? Disable it in /etc/inittab and do "init q", check
if process is not respawned anymore.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=141554913-19052004>6.
Check access rights again from serial device.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=141554913-19052004>7. Try
to set the suid flag as root, just to see if this fix the
problem.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=141554913-19052004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=141554913-19052004>kind
regards,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=141554913-19052004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=141554913-19052004>ludo</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=141554913-19052004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=141554913-19052004></SPAN></FONT> </DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Onsite DeTeWe
[mailto:Onsite.DeTeWe@firstgroup.com]<BR><B>Sent:</B> woensdag 19 mei 2004
14:02<BR><B>To:</B> Ludo Bosmans;
nagios-users@lists.sourceforge.net<BR><B>Subject:</B> RE: [Nagios-users] SMS
notifications<BR><BR></FONT></DIV><BR><FONT face=sans-serif
size=2>Hiya,</FONT> <BR><BR><FONT face=sans-serif size=2>Yeah sorry..
Should have explained in full.</FONT> <BR><BR><FONT face=sans-serif
size=2>I have a host-notify-by-sms and notify-by-sms in the .cfg. One
for service and one for host. The snippet I sent was for a host
down.</FONT> <BR><BR><FONT face=sans-serif size=2>Really puzzling as the other
commands in the .cfg for host-notify-by-email and notify-by-email work
fine. All I did was replace them.</FONT> <BR><BR><FONT face=sans-serif
size=2>J</FONT> <BR><BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR vAlign=top>
<TD>
<TD>
<DIV align=right><FONT face=sans-serif size=1><B>Ludo Bosmans
<ludo.bosmans@xtenso.be></B></FONT>
<P><FONT face=sans-serif size=1>19/05/2004 11:59</FONT></P></DIV>
<TD><FONT face=Arial size=1> </FONT><BR><FONT
face=sans-serif size=1> To:
'Onsite DeTeWe' <Onsite.DeTeWe@firstgroup.com>, Ludo
Bosmans <ludo.bosmans@xtenso.be>,
nagios-users@lists.sourceforge.net</FONT> <BR><FONT face=sans-serif
size=1> cc:
</FONT> <BR><FONT face=sans-serif size=1>
Subject: RE: [Nagios-users] SMS
notifications</FONT></TR></TBODY></TABLE><BR><BR><BR><BR><FONT
size=2>Jason,</FONT> <BR><FONT size=3> </FONT> <BR><FONT size=2>I
suppose that the manual test is ok ? Of course replace the macros with
the corresponding values.</FONT> <BR><FONT size=3> /usr/bin/printf
"%b" "**Nagios**\nType: $NOTIFICATIONTYPE$\nHost:
$HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
$OUTPUT$\nDate/Time: $DATETIME$\n" | /usr/local/bin/gnokii
--sendsms $CONTACTPAGER$ </FONT><BR><FONT size=3> </FONT> <BR><FONT
size=3>In the checkcommands you have a "notify-by-sms", but in the
syslog there is "host-notify-by-sms", so you need to check the syntax of
that config entry and try manually to execute the command to see if it
works.</FONT> <BR><FONT size=3> </FONT> <BR><FONT size=3>kind
regards,</FONT> <BR><FONT size=3> </FONT> <BR><FONT
size=3>ludo</FONT> <BR><FONT size=2> </FONT> <BR><BR><BR><FONT
size=2>-----Original Message-----</FONT> <BR><FONT size=2><B>From:</B> Onsite
DeTeWe [mailto:Onsite.DeTeWe@firstgroup.com]</FONT> <BR><FONT
size=2><B>Sent:</B> woensdag 19 mei 2004 12:22</FONT> <BR><FONT
size=2><B>To:</B> Ludo Bosmans;
nagios-users@lists.sourceforge.net</FONT> <BR><FONT
size=2><B>Subject:</B> RE: [Nagios-users] SMS notifications</FONT>
<BR><BR><BR><BR><FONT size=2>Thanks for your reply,</FONT><FONT size=3>
</FONT><BR><BR><FONT size=2>I do have a nokia connected to the serial
port, but I am using the phone to send the texts.</FONT><FONT size=3>
</FONT><BR><BR><FONT size=2>Regarding the macro, I have also tried just
using the mobile number for a test. This still does not work.
Here is a syslog message when a host does down.</FONT><FONT size=3>
</FONT> <BR><BR><FONT size=2>May 19 11:11:48 SNMPServer nagios: HOST
NOTIFICATION: server;fiplog01;UP;<B>host-notify-by-sms</B>;PING OK -
Packet loss = 0%, RTA = 58.53 ms</FONT><FONT size=3>
</FONT><BR><BR><FONT size=2>As you can see the trigger is being used,
just nothing more happening.</FONT><FONT size=3> </FONT> <BR><BR><FONT
size=2>Jason</FONT><FONT size=3> </FONT><BR><BR><BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR vAlign=top>
<TD width="1%">
<TD width="34%">
<DIV align=right><FONT size=1><B>Ludo Bosmans
<ludo.bosmans@xtenso.be></B></FONT><FONT size=3>
</FONT> <BR><BR><FONT size=1>19/05/2004 11:06</FONT></DIV>
<TD width="64%"><FONT size=1>
</FONT><BR><FONT size=1> To:
'Onsite DeTeWe' <Onsite.DeTeWe@firstgroup.com>,
nagios-users@lists.sourceforge.net</FONT><FONT size=3>
</FONT><BR><FONT size=1> cc:
</FONT><FONT size=3> </FONT><BR><FONT size=1>
Subject: RE:
[Nagios-users] SMS
notifications</FONT></TR></TBODY></TABLE><BR><BR><BR><BR><FONT size=2>Hi
Jason,</FONT><FONT size=3> </FONT><BR><FONT size=3>
</FONT><BR><FONT size=2>I use also gnokii to send sms's. I
don't know your set-up, do you have a Nokia connected to a serial
port ?</FONT><FONT size=3> </FONT><BR><FONT size=2>Imy
configuration i have a modem connected to the serial port and
i establish a call to a local provider smc center. So i am able to
drop more then 1 sms at the time in one connection. Only the call
to the smc center is charged. No charge for the sms's
itself.</FONT><FONT size=3> </FONT><BR><FONT size=3> </FONT><BR><FONT
size=2>So i can not really simulate, but it seems for me that the
$CONTACTPAGERS$ macro is wrong, it must be
$CONTACTPAGER$.</FONT><FONT size=3> </FONT><BR><FONT size=3>
</FONT><BR><FONT size=2>kind regards,</FONT><FONT size=3>
</FONT><BR><FONT size=3> </FONT><BR><FONT size=2>ludo</FONT><FONT
size=3> </FONT><BR><FONT size=2>-----Original Message-----</FONT><FONT size=3>
</FONT> <BR><FONT size=2><B>From:</B> Onsite DeTeWe
[mailto:Onsite.DeTeWe@firstgroup.com]</FONT><FONT size=3>
</FONT><BR><FONT size=2><B>Sent:</B> woensdag 19 mei 2004
11:34</FONT><FONT size=3> </FONT><BR><FONT size=2><B>To:</B>
nagios-users@lists.sourceforge.net</FONT><FONT size=3> </FONT><BR><FONT
size=2><B>Subject:</B> [Nagios-users] SMS notifications</FONT><FONT
size=3> </FONT> <BR><BR><BR><BR><FONT size=2>Hi All,</FONT><FONT size=3>
</FONT><BR><BR><FONT size=2>I have just setup a mobile gateway on our
nagios box (6310i with serial lead ;-). Got all the SMS
stuff working using gnokii which works a treat. Recommend it to
anyone. However, when I try and get nagios to use a new
notify routine it fails to send the text.</FONT><FONT size=3>
</FONT><BR><BR><FONT size=2>Debug so far.</FONT><FONT size=3>
</FONT><BR><BR><FONT size=2>Got gnokii to send SMS
direct.</FONT><FONT size=3> </FONT><BR><FONT size=2>Added
notify-by-sms to misccommands.cfg.</FONT><FONT size=3>
</FONT><BR><FONT size=2> I know the
above works as I then cut the command from the .cfg and run it
from the command line direct and it works.</FONT><FONT size=3>
</FONT><BR><BR><FONT size=2>Could this be a permissions thing associated
with the nagios user???</FONT><FONT size=3> </FONT> <BR><BR><FONT
size=2>When I force a host down and look in the syslog the
notification does try and send via the correct command, it seems
like just the command from within nagios is not
working.</FONT><FONT size=3> </FONT><BR><BR><FONT size=2>Hope
someone can help.</FONT><FONT size=3> </FONT><BR><BR><FONT
size=2>Regards</FONT><FONT size=3> </FONT><BR><BR><FONT
size=2>Jason</FONT><FONT size=3> </FONT><BR><BR><BR><BR><FONT size=2>This is
the command line.</FONT><FONT size=3> </FONT><BR><BR><FONT
size=2>/usr/bin/printf "%b" "**Nagios**\nType: $NOTIFICATIONTYPE$\nHost:
$HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo:
$OUTPUT$\nDate/Time: $DATETIME$\n" | /usr/local/bin/gnokii
--sendsms $CONTACTPAGERS$</FONT><FONT size=3> </FONT><BR><BR><FONT
size=3>**********************************************************************
</FONT> <BR><FONT size=3>This message is confidential. It may not
be disclosed to, or used by, </FONT><BR><FONT size=3>anyone other
than the addressee. If you receive this message in </FONT><BR><FONT
size=3>error, please advise us immediately. </FONT><BR><BR><FONT
size=3>Internet email is not necessarily secure. First does not
accept </FONT><BR><FONT size=3>responsibility for changes to any email which
occur after the email </FONT><BR><FONT size=3>has been sent.
Attachments to this email could contain software </FONT><BR><FONT
size=3>viruses which could damage your system. First have checked
the </FONT><BR><FONT size=3>attachments for viruses before
sending, but you should virus-check </FONT><BR><FONT size=3>them before
opening. </FONT><BR><BR><FONT size=3>http://www.firstgroup.com
</FONT><BR><FONT
size=3>**********************************************************************
</FONT> <BR><BR><BR></BLOCKQUOTE></BODY></HTML>