Gnokii says yes..i say no
Brad Dunn
Brad at pretzel.com.au
Thu Apr 17 07:49:04 CEST 2003
Hi there, I had a question about gnokii in relation to sending nagios SMS
alerts.
First off this is on a Debian linux box and gnokii works no worries from the
command line. Nagios Also has the permissions in order to run gnokii
commands as when I su to nagios I can still send sms's manually etc.
Next this is from my /var/nagios.log file which to me seems to indicate that
the SMS's are being send ok. (which they aren't)
<SNIP>
[1050586817] SERVICE NOTIFICATION: nagios;server91;FTP;OK;notify-by-sms;FTP
OK - 0.008 second response time on port 21 [220 server91 Micro
soft FTP Service (Version 5.0).]
</SNIP>
This is what my contacts.cfg looks like
<SNIP>
# '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,notify-by-sms
host_notification_commands
host-notify-by-email,host-notify-by-sms
email alerts at pretzel.com.au
pager 0420000000
}
</SNIP>
And this is what my misccommands.cfg looks like
<SNIP>
# 'notify-by-sms'
define command{
command_name notify-by-sms
command_line /bin/echo '$NOTIFICATIONTYPE$: $HOSTNAME$:
$SERVICEDESC$ is $SERVICESTATE$ ($OUTPUT$)'| /usr/local/bin/gnokii --sendsm
s $CONTACTPAGER$
}
# 'host-notify-by-sms'
define command{
command_name host-notify-by-sms
command_line /bin/echo '$NOTIFICATIONTYPE$: $HOSTNAME$ is
$HOSTSTATE$ ($OUTPUT$)' | /usr/local/bin/gnokii --sendsms $CONTACTPAGER$
}
</SNIP>
Note # my gnokii bin sits [/usr/local/bin/gnokii]
The gnokii config file looks like this
<SNIP>
[global]
port = /dev/ttyS0
model = 7110
initlength = default
connection = serial
bindir = /usr/sbin/
</SNIP>
Now I cant find any other useful gnokii / nagios logs that are reporting any
errors that would help me work this out. Does anyone have any suggestions,
I've been through the forums and FAQ's etc with little luck on finding a
solution.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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