How to use Nagios to send SMS

Hi,
I was looking for a monitoring software for mine severs and I end up with nagios, i am in basic stage, not know much about it, but try to set it up,
i setup nagios to send notification sms and notification emails, i am sucessully getiing email notification but unable to get sms’s , i m posting mine configurations files below hope that will help to rectify the problem and i am using CENTOS 5 i unstall using nagios rpm package…and i am using Nokia Phone with gnokii…

i am using nagios with gnokii…

first i check phone is atached or not by

[root@app ~]# gnokii –identify
GNOKII Version 0.6.19
IMEI : 366882008837174
Manufacturer : Nokia
Model : Nokia 7610
Product name : Nokia 7610
Revision : V 5.0509.0

  1. second i try to send sms

[root@app ~]# echo “hello World” | gnokii –sendsms +919910124897
GNOKII Version 0.6.19
Send succeeded!

  1. this is mine template.cfg { i have installed by rpm}

define contact{
name generic-contact ; The name of this contact template
service_notification_period 24×7 ; service notifications can be sent anytime
host_notification_period 24×7 ; host notifications can be sent anytime
service_notification_options w,u,c,r,f,s ; send notifications for all service states, flapping events, and scheduled downtime events
host_notification_options d,u,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime events
service_notification_commands notify-service-by-email,notify-service-by-sms ; send service notifications via email
host_notification_commands notify-host-by-email,notify-host-by-sms ; send host notifications via email
register 0 ; DONT REGISTER THIS DEFINITION – ITS NOT A REAL CONTACT, JUST A TEMPLATE!
}

  1. this is mine contact.cfg

define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user

email [email protected] ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS *****
pager +919910124897
}

  1. then i find gnokii

[root@app objects]# which gnokii
/usr/bin/gnokii
[root@app objects]#

and printf

[root@app objects]# which printf
/usr/bin/printf

==================================
6. and here is mine command.cfg

define command {
command_name notify-service-by-sms
command_line /usr/bin/printf “%.120s” “Nagios – $NOTIFICATIONTYPE$ : $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ ($OUTPUT$)” | /usr/bin/gnokii –sendsms $CONTACTPAGER$ -r
}

define command {
command_name notify-host-by-sms
command_line /usr/bin/printf “%.120s” “Nagios – $NOTIFICATIONTYPE$ : Host $HOSTALIAS$ is $HOSTSTATE$ ($OUTPUT$)” | /usr/bin/gnokii –sendsms $CONTACTPAGER$ -r
}

===============================

and i think everything seems fine but i am still not able to get sms . can u please help me i m still not able to find what is wrong…

Thanks

Regards
AMan Dhally

No replies Cooool :o

it can only be in your host-notify-by-sms or gnokii itself… if few people use it you will get few answers :slight_smile:

I use sms_client

Works like a dream.

Configuring is a bit tricky…

Try this own made manual…
Maybe it helps…

let me know if it helps