Custom Notification Script
Marc Powell
marc at ena.com
Thu Apr 22 16:43:27 CEST 2004
Upayavira <mailto:uv at upaya.co.uk> wrote:
> Marc Powell wrote:
>
> > Don't you mean $CONTACTPAGER$? $CONTACTPAGER} is incorrect. You
> > don't specifically say you did it but you should also verify that
> > the script is executable as the nagios user if you haven't already.
>
>
> Actually, I typed that from memory, as I didn't have access to my
> server at the time. That I only go that bit wrong is rather
> impressive I think ;-)
>
> Anyway, here is the correct extract from misccommands.cfg (this time
> using cut and paste!):
>
> define command{
> command_name notify-by-sms
> command_line /home/web/bin/sendSMS.pl $CONTACTPAGER$
> "$NOTIFICATIONTY
> PE: $HOSTADDRESS$ $HOSTALIAS$: $SERVICEDESC$ is $SERVICESTATE$"
> }
>
> define command{
> command_name host-notify-by-sms
> command_line /home/web/bin/sendSMS.pl $CONTACTPAGER$ "Host
> $HOSTALIAS
> $ is $HOSTSTATE$; $OUTPUT$; $DATETIME$"
> }
>
> I do not see why this shouldn't work. Unless it is because Nagios
> tries to use its embedded perl to run my Perl script. Might it be
> doing that?
Still looks like you have a typo, especially if this is cut-n-paste ;)
$NOTIFICATIONTYPE$. You have '$NOTIFICATIONTYPE:'
-
Marc
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&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