alerts on SMS

kumar s k kumar_ks_00 at rediffmail.com
Wed Nov 10 13:18:12 CET 2004


  
hi,

i compiled gnokii on nagios server for sending sms and i connected my Nokia 3315 Mobile phone is connected. if i send sms using gnokii from root and nagios users, the message is sucessfully delevered. i configured my nagios server configurations of contacts and misccommands and nagios cfg's like this.

contacts.cfg
#'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-epager
host_notification_commands     host-notify-by-email,host-notify-by-epager
email                          sysadmin at mydomain.com
pager                          +919892400971
}

misccommands.cfg

define command{
command_name  notify-by-email
command_line  /usr/bin/printf "%b" "****Nagios ****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\n\nHost:   ........ | /bin/mail -s "*** $NOTIFICATIONTYPE$ alert $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTAT$ **" $CONTACTMAIL$
}

define command{
command_name   notify-by-epager
command_line   /usr/bin/printf "%b" "Service: $SERVICEDESC$\nHost: $HOSTADDRESS$\nState: $SERVICESTATE$\nInfo: $OUTPUT$\nDate: $DATAETIME$" | /usr/local/bin/gnokii --sendsms -r $CONTACTPAGER$
}

same as  host-notify-by-email and host-notify-by-epager.

nagios.cfg

admin_email=root at localhost
admin_pager=+919892400971


using above the configuration when ever my host / service goes down it send mail and sms. but i don't get any sms. if i send sms using same  from nagios user and root users it deleverd sms. I checked /var/log/messages, it shows host notified and service notified.

How will i send Nagios mail alerts to different mail server users internally.

pl. help me out

rgds,
kumar 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20041110/edc12279/attachment.html>


More information about the Users mailing list