View FAQ

[ Return To FAQ Index | Search The FAQs ]


FAQ Database : Nagios : Notifications

Title:Q: How i can use gnokii with nagios
FAQ ID:F0220
Submitted By:Horst Venzkeq 
Last Updated:01/08/2005

Description:

Nagios 2way sms / mms Notification.

With smsclient and others only one-way notification is possible. Using Gnokii can solve that.

 

Solution:#Nagios command obj
# 'host-notify-by-gnokii' command definition
define command{
command_name host-notify-by-gnokii
command_line /opt/nagios/bin/sms_notification_by_gnokki $CONTACTPAGER$ "Nagios Host Alert \n\n $HOSTALIAS$ is $HOSTSTATE$; $OUTPUT$; $DATETIME$"
}

send sms example script:
----------------------------------
#!/bin/sh
#
# Gnokii Plugin script
# (c) Horst venzke
# v 0.1 - 17.01.2004

mess=$2
number=$1
echo $mess | gnokii --sendsms $number

-----------------------------------------

With --getsms you can download msgs from and Handy folder and execute command/alarms and more. See gnokii manpages for more.  


Keywords:Gnokii SMS MMS