Problem executing custom notification perl script

Francesco Albrizio francesco.albrizio at init.it
Thu Feb 20 10:22:38 CET 2003


Thanks for your hint, but the script is not really executed because, even with wrong args, on first lines it logs its activation in a file. Now I will try using different shells for launching it.

Thanks again,

Francesco
  ----- Original Message ----- 
  From: Pettersson, Magnus 
  To: 'Francesco Albrizio' ; nagios-users at lists.sourceforge.net 
  Sent: Thursday, February 20, 2003 10:11 AM
  Subject: RE: [Nagios-users] Problem executing custom notification perl script


  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
    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/452ddc41/attachment.html>


More information about the Users mailing list