sms_client notification problem, $CONTACTPAGER$ not passed correctly ?
Fischer Matthias
matthias.fischer at gundlach.de
Thu Apr 7 08:31:14 CEST 2005
Hi List
I have a problem regarding notifications sent by sms_client :/
Things I´ve done so far :
- Installed sms_client and tested function (sent sms by using the shell "sms_client <number> test" i.e. works perfectly fine.
- added the notify-by-sms command into misccomands.cfg
misccommands.cfg :
define command{
command_name notify-by-sms
command_line /bin/sms_client -q $CONTACTPAGER$ '$NOTIFICATIONTYPE$: $HOSTNAME$: $SERVICEDESC$ is $SERVICESTATE$ ($OUTPUT$)'
}
define command{
command_name host-notify-by-sms
command_line /bin/sms_client -q $CONTACTPAGER$ '$NOTIFICATIONTYPE$: $HOSTNAME$ is $HOSTSTATE$ ($OUTPUT$)'
}
- Added the number of my cellphone to my contact-information
# 'matthias.fischer' contact definition
define contact{
contact_name matthias.fischer
alias Matthias Fischer
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 matthias.fischer at gundlach.de
pager <number>
}
- Every time a notification via email occured I take a look into the log-file and it says :
Apr 6 11:47:36 localhost nagios: SERVICE NOTIFICATION: matthias.fischer;Entropoint;TELNET;CRITICAL;notify-by-sms;Connection refused by host
Doesn´t look like an errormessage to me o.O
- What I´ve done next :
I have replaced the notify-by-sms command line in the misccommands.cfg with something like :
/usr/bin/printf "$CONTACTPAGER$ '$NOTIFICATIONTYPE$: $HOSTNAME$: $SERVICEDESC$ is $SERVICESTATE$ ($OUTPUT$)'" > /tmp/test1
This line does generate a file called test1 in the given directory but : This file is empty :(
I´m quite puzzled by now O.o
Could it be that there is a problem with that $CONTACTPAGER$ variable ?
May be someone else faced the same problem before ?
May be I´m just too dumb ?
Thanks in Advance
Cheers
Matthias
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
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