bernie liwanag
2003-03-05 03:55:03 UTC
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 ***@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/
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 ***@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/