Sending SMS from Nagios

Riemer Palstra riemer at palstra.com
Fri May 11 03:08:35 CEST 2007


On Fri, May 11, 2007 at 10:49:38AM +1000, Andrew Lee wrote:
> Thanks that makes sense. However I am having trouble finding that
> script. Where is it initially located? Should it be inside the gnokii
> package I downloaded? I have tried google. It seems to only return
> links to the faq I mentioned earlier.

Please don't toppost. I think you're still misunderstanding, this:

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

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

*is* the script. Save it as sms_notification_by_gnokki, make it
executable and reference it in your command definition using the
following:

#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$"
}

Depending on where you save your script, you might want to change
'/opt/nagios/bin/' to something else.

-- 
Riemer Palstra
riemer at palstra.com

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
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