pullin my hair out here…
I have a simple usb modem (falcom samba). Installed and I can run [sendsms 1234567890 “message here”] from the command line and get the sms on my cell phone.
In nagios I’ve added this to command.cfg
# 'notify-host-by-sms' command definition
define command{
command_name notify-host-by-sms
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /usr/local/bin/sendsms $CONTACTPAGER$ "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **"
}
and a similar one for notify-service-by-sms.
then my contact.cfg
[code]define contact{
contact_name mecell
use sms-contact
alias Me Cell
host_notifications_enabled 1
service_notifications_enabled 1
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r
service_notification_options w,u,c,r
service_notification_commands notify-service-by-sms ; send service notifications via sms
host_notification_commands notify-host-by-sms ; send host notifications via sms
pager 18885551234
}[/code]
and then in the host I have the contact for the error defined as mecell.
then I turn off the nic in the host (just have a ping check running to test) and I get the email when I also have admin as a contact but never the sms. I see nothing in /var/log/sms.log and I have it set up all the way.
Any pointers here?