Problem executing custom notification perl script
Francesco Albrizio
francesco.albrizio at init.it
Fri Feb 21 12:54:06 CET 2003
Evolution: now all is working, but I don't understand why. I had to modify rights on the script, but not execution and reading rights (that there were before), I had to add writing (!) permission to nagios group and rest of the world (i.e: chmod 777 <script> instead of chmod 755 <script>). It seems that nagios pretends to allow to other users to write in this file.
Why? Perché?
Regards,
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
----- Original Message -----
From: Francesco Albrizio
To: nagios-users at lists.sourceforge.net
Cc: mauro.zini at init.it
Sent: Wednesday, February 19, 2003 1:17 PM
Subject: [Nagios-users] Problem executing custom notification perl script
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/20030221/a0184f17/attachment.html>
More information about the Users
mailing list