Custom Paging from miscommands.cfg

Sumit Malhotra smalhotra at dataarmor.net
Thu Dec 9 14:40:49 CET 2004



-----Original Message-----
From: David Abbishaw [mailto:David at Abbishaw.com] 
Sent: Thursday, December 09, 2004 6:24 PM
To: nagios-users at lists.sourceforge.net
Subject: [Nagios-users] Custom Paging from miscommands.cfg

I have a custom script that doesnt accept data thats been piped into it,
instead the data to send a page must be on the command line, in a shell
the syntax is

/usr/sbin/sendpage.pl userfrom userto Y message

In Nagios the user is setup to match the user to so $CONTACTPAGER$ 
should
contain the correct information.

The Y instructs the script to send an email as well as a SMS. And 
message
is a string to send as a message.

Problem is that it doesnt appear to be getting executed correctly.  
Heres
whats in the miscommands.cfg and the event log shows that its been 
called
just doesnt appear to be working :( sigh.


# 'notify-by-VMPager' command definition
define command{
        command_name    notify-by-VMPager
        command_line    /usr/bin/sendpage.pl $CONTACTPAGER$ 
$CONTACTPAGER$
N "Service: $SERVICEDESC$\nHost: $HOSTNAME$\nAddress:
$HOSTADDRESS$\nState: $SERVICESTATE$\nInfo:$OUTPUT$$
>>>>>>
>>>>>>Why are you adding two $$ in the end ? Also closing " is missing

Some tips which may help you 

1. Try running the script  as user nagios you may have permission 
problems 
2. Try  doing some logging in the perl script  to enable better 
debugging
3. if there is arr " in the message or error then it may things worse.

 Best of luck 

-Sumit


        }

Any ideas would really be helpful.

Thanks


-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
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


-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
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