sms alert using gnokii
bernie liwanag
bliwanag at yahoo.com
Wed Mar 5 06:54:00 CET 2003
Hi to all!
How can I make gnokii works on my nagios.I have my
gnokii running using a command prompt. I can send and
received a text message using the command :
# /usr/local/sbin/gnokii --sendsms <cell phone #>
- Here is my sample conifiguration in contacts.cfg
file
# 'nagios' contact definition
define contact{
contact_name nagios
alias Nagios Admin
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands
notify-by-email,host-notify-by-sms
host_notification_commands
host-notify-by-email,host-notify-by-sms
email root at mallinux.test.com.ph
}
- Here is my sample configuration of misccommands.cfg
# 'host-notify-by-sms' command definition
define command
command_name host-notify-by-sms
command_line /usr/bin/printf "Host '$HOSTALIAS$'
is $ $HOSTSTATE$\nInfo: $OUTPUT$\nTime: $DATETIME$" |
/usr/local/sbin/gnokii --sendsms 09201234567
}
# 'notify-by-sms' command definition
define command{
command_name notify-by-sms
command_line /usr/bin/printf "Service:
$SERVICEDESC$\nHost: $HOSTNAME$\nAddress:
$HOSTADDRESS$\nState: $SERVICESTATE$\nInfo:
$OUTPUT$\nDate: $DATETI
ME$" | /usr/local/sbin/gnokii --sendsms 09201234567
}
I have included the .gnokiirc config file in both
/root/ directory and /home/nagios/ directory
Can someone tells me what wrong with my config?
Thanks a lot to all!
Bernie
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger
for complex code. Debugging C/C++ programs can leave you feeling lost and
disoriented. TotalView can help you find your way. Available on major UNIX
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list