Notification difficulties
Christian Kammer Have
CKH99 at bbh.hosp.dk
Mon Apr 10 09:13:19 CEST 2006
Hello! I'm running nagios 2.2(although the problem was existing in 2.0).
I am trying to enable our sms modem( a nokia 30) to send sms messages
whenever anything goes down.
So far i have setup timeperiods, contacts, contactgroups and enabled which
ever notificationoptions that were needed.
I have managed to install GSM-lib and have successfully sent sms messages
directly from the software supplied.
This is my command:
define command {
command_name notify-by-epager
command_line /usr/bin/printf "%b" "$HOSTNAME$: $SERVICEDESC$ is
$SERVICESTATE$ @'$CONTACTPAGER'$" > /var/spool/sms/sms`date
+%d%m%Y%H%M%S%N`
}
The problem seems to be that the $CONTACTPAGER$ variable is empty.
the content of my textfile is: HOST: CPU Load is CRITICAL @''
I have tried with the $USERADDRESS1$ variable, with the email variable and
so forth. I have tried without single quotation and with double quotation.
This is my contacts definition:
define contact {
contact_name Vagt
alias Vagt
contactgroups admins,Citrix,Windows
host_notification_period 24x7
service_notification_period 24x7
host_notification_options d,u,r
service_notification_options w,u,c,r
host_notification_commands host-notify-by-epager
service_notification_commands notify-by-epager
pager <phonenumber>
}
Here are the time periods:
define timeperiod {
timeperiod_name 24x7
alias 24 Hours A Day, 7 Days A Week
sunday 00:00-24:00
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
saturday 00:00-24:00
}
And from the menu in nagios i can see that the notification has been
"processed":
Host Service Type Time Contact
NotificationCommand Information
host Web server CRITICAL 04-09-2006 22:33:01 Vagt
notify-by-epager Connection refused
I'm really without any clue of what i have been doing wrong.
but, as I said earlier, it seems to be as if the variables containing
contactinformations are empty.
Regards
Security Specialist
Christian Kammer Have
Bispebjerg Hospital
MIT (Mediko, Informatik & Tele)
Bispebjerg Bakke 23
2400 København NV
mobil: 2044 0125
E-mail: ckh99 at bbh.hosp.dk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20060410/db22df50/attachment.html>
More information about the Users
mailing list