Problem executing custom notification perl scr ipt

Pettersson, Magnus magnus.pettersson at eds.com
Thu Feb 20 10:11:26 CET 2003


Just a thought.
If your $OUTPUT$ contains any " they may terminate that argument. Try and
switch to '
 
/magnus

 

Hi all,
 
I've written a perl script that, when called by nagios like a normal
notification command, access to a remote mssql server updating a database.
In the miscommands.cfg I have the following lines for command definition:
 
# 'master_host'
define command{
        command_name    master_host
        command_line    /usr/lib/nagios/plugins/master_notify_host.pl
$HOSTNAME$ $HOSTSTATE$ $HOSTADDRESS$ $CONTACTEMAIL$ $NOTIFICATIONTYPE$
"$OUTPUT$" "$DATETIME$"
        }
 
Everything works fine if I call the master_notify_host.pl script by hand,
even from user "nagios" in a scheduled cronjob. In nagios.log, it appears
that the script has been executed, but it seems not true :) Plus: I'm not
using the nagios embedded perl interpreter, just normal perl.
 
Some ideas? This thing is making me become old very quickly :)
 
Thanks guys,
 
Francesco Albrizio
E-mail: francesco.albrizio at init.it <mailto:francesco.albrizio at init.it> 
Network & Security Manager
UNITEAM INIT
InterNetworking & Information Technology
via Imperia, 2
20142 MILANO
Tel. 02-89546000
Fax. 02-8467832

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


More information about the Users mailing list