Nagios Core and SMS alerts (or lack of) through Nagios
Andrew Thompson
andrew at fulgent.co.uk
Fri Nov 11 10:30:23 CET 2011
Hi all,
Im at my wits end.
Spent 2 days now trying to get Nagios to SMS me through gnokii but a lunar eclipse is a more frequent event!
So i have Ubuntu 11.04 installed using postfix to email me alerts (works flawlessly)
Now i also want a text message as a failover incase my Exchange server or internet line goes down.
I have installed and configured gnokii to what i think is at a functioning level.
I have a Nokia 6301 mobile hooked up to Ubuntu via USB cable.
I can send a text message out through the phone via the CLI no issue at all with both my admin user logged in and also when i log in as the nagios user so i know i have the correct permissions on the ttyACM0 port that is assigned to the 6301.
Will Nagios send an SMS - will it f*£$!!
Here is my command.cfg relevant part
# 'notify-host-by-sms' command definition
define command{
command_name notify-host-by-sms
command_line /usr/bin/printf "%.120s" "***** Nagios ***** $NOTIFICATIONTYPE$: Host $HOSTALIAS$ is $HOSTSTATE$ | /usr/bin/gnokii --sendsms $CONTACTPAGER$
}
# 'notify-service-by-sms' command definition
define command{
command_name notify-service-by-sms
command_line /usr/bin/printf "%.120" "***** Nagios ***** $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ | /usr/bin/gnokii --sendsms $CONTACTPAGER$
}
Here is my contact.cfg
define contact{
contact_name MYNAME
use generic-contact
alias MYNAME
host_notification_options d,u,r,f
service_notification_options w,u,c,r,f
email MYEMAIL
pager +44XXXXXXXXX
host_notification_period 24x7
service_notification_period 24x7
host_notification_commands notify-host-by-email,notify-host-by-sms
service_notification_commands notify-service-by-email,notify-service-by-sms
Here is my templates.cfg
define contact{
name generic-contact
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f,s
host_notification_options d,u,r,f,s
service_notification_commands notify-service-by-email, notify-service-by-sms
host_notification_commands notify-host-by-email, notify-host-by-sms
register 0
}
what can be going on - why will nagios not SMS me? Its got to be a nagios config issue and not gnokii error as I can send text through CLI fine,
Please help me, im going insane
Thanks
Kind Regards
Andrew
T: 01386 834000
F: 01386 834100
Andrew at fulgent.co.uk<mailto:Andrew at fulgent.co.uk>
www.fulgent.co.uk<http://www.fulgent.co.uk/>
Fulgent Technologies Limited, Haddonsacre, Station Road, Offenham, Evesham, WR11 8JJ. This communication contains information which is confidential and may also be privileged or protected by copyright. It is for the exclusive use of the addressee. If you are not the addressee please note that any distribution, reproduction, copying, publication or use of this communication or the information is prohibited. If you have received this communication in error, please telephone us immediately and also delete the communication from your computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20111111/32bdd815/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
-------------- next part --------------
_______________________________________________
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