send nagios sms notification using gammu
hello everyone. i'm just install nagios in my linux box. and i configure it according to nagios documentation. the email notification working as well but the sms notification is not working. this is my configuration file...
command.cfg
Quote:
# 'host-notify-by-sms' command definition
define command{
command_name host-notify-by-sms
command_line /usr/bin/printf "%b" "NAGIOS / Host: "$HOSTNAME$" / State: $HOSTSTATE$ / Info:$HOSTOUTPUT$ / Date:$SHORTDATETIME$" | /usr/bin/gammu --sendsms TEXT $CONTACTPAGER$
}
# 'notify-by-sms' command definition
define command{
command_name notify-by-sms
command_line /usr/bin/printf "%b" "NAGIOS / Host: "$HOSTALIAS$" / State: $SERVICESTATE$ / Info:$SERVICEOUTPUT$ / Date:$SHORTDATETIME$" | /usr/bin/gammu --sendsms TEXT $CONTACTPAGER$
}
contact.cfg
Quote:
define contact{
contact_name sms
alias sms
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c,r
host_notification_options d,r
service_notification_commands notify-by-sms
host_notification_commands host-notify-by-sms
pager 013XXXXXXX
}
define contactgroup{
contactgroup_name admins
alias Nagios Administrators
members email, sms
}
and i also can using gammu by using command
echo "testing" | gammu --sendsms TEXT 013XXXXXXX
anyone kwow how to solve this problem?i'm sorry if i post this threat at the wrong forum.... :(:confused:
Re: send nagios sms notification using gammu
Thread moved to "Networking & Wireless"
Re: send nagios sms notification using gammu
somebody help me please.....
Re: send nagios sms notification using gammu
I am currently trying a similar setup that isn't sending.
But looking at your setup I believe you cannot have pager and $CONTACTPAGER$ defined for the extra notification addresses, you shall use addressn and the macro $CONTACTADDRESSn$
Edit: sorry, I see that pager is defined as a macro. Carry on...