SMS alert using gnokii

Hi nagios experts.
I would like to know how can i go about this problem.
I’m pretty sure that my contacts.cfg, commands.cfg, host.cfg are fine…
I have already check the nagios user for permission issues. I tried to send sms using nagios user and it was all working.
my problem is this. I can’t receive nagios sms alert.

[1271233929] HOST ALERT: NOC_REPORTS;DOWN;HARD;1;CRITICAL - Host Unreachable (192.168.30.115)
[1271233929] HOST NOTIFICATION: admin; REPORT;DOWN;notify-host-by-sms;CRITICAL - Host Unreachable (192.168.XXX.XXX)
[1271233990] Warning: Contact ‘wel’ host notification command ‘/usr/bin/printf "NAGIOS ALERT PROBLEM : Host REPORTS is DOWN as of " | /usr/bin/gnokii --sendsms 09179029084’** timed out after 60 seconds**

timed out after 60 seconds? i already change notification_timeout in nagios.cfg to much higher value but still i’m having that warning message.

can anyone help me please? :smiley:

try putting the send sms command in a script, run it with crontab and see if it works.

It’s probably a missing enviroment variable of some sort…

I also did that using crontab. it works. because i think its outside nagios.
i already tried using a script but the warning message is still there. timed out after 60 seconds.
i think nagios is executing the send sms alert but i just dont know why can’t i receive it. i’ll post a
tutorial if you can help me. to help others who has the same problem with me.
i’m using ubuntu karmic koala.

nagios doesn’t run scripts “inside” itself… it just calls them, so if it runs under the nagios user crontab it should work the same in nagios.