SV: sms alert using gnokii

Allan Hansen, INBODAN avh at inbodan.dk
Wed Mar 5 16:01:48 CET 2003


As you do not describe what errors you get, it is a bit difficult to provide
an exact answer.

The advise I got when setting this up about 6 months ago, was to use some
form of gateway between Nagios and Gnokii. 
Gnokii needs some kind of queing mechanism, otherwise it might choke when
sending multiple notifications.

I am using Alamin (www.alamin.org). It was somewhat difficult to set up, but
runs fine. I can't find my notes about the installation, but I remember this
has been on the list in the past. 

You should also check the FAQ at:

	
http://www.nagios.org/faqs/viewfaq.php?faq_id=65&expand=false&showdesc=true

/Allan


-----Oprindelig meddelelse-----
Fra: bernie liwanag [mailto:bliwanag at yahoo.com] 
Sendt: 5. marts 2003 06:54
Til: nagios-users at lists.sourceforge.net
Emne: [Nagios-users] sms alert using gnokii


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


-------------------------------------------------------
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