<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks again,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Francesco</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=magnus.pettersson@eds.com
href="mailto:magnus.pettersson@eds.com">Pettersson, Magnus</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=francesco.albrizio@init.it
href="mailto:francesco.albrizio@init.it">'Francesco Albrizio'</A> ; <A
title=nagios-users@lists.sourceforge.net
href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, February 20, 2003 10:11
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [Nagios-users] Problem
executing custom notification perl script</DIV>
<DIV><FONT face=Arial size=2></FONT><BR></DIV>
<DIV><SPAN class=137470509-20022003><FONT face=Arial color=#0000ff size=2>Just
a thought.</FONT></SPAN></DIV>
<DIV><SPAN class=137470509-20022003><FONT face=Arial color=#0000ff size=2>If
your $OUTPUT$ contains any " they may terminate that argument. Try and switch
to '</FONT></SPAN></DIV>
<DIV><SPAN class=137470509-20022003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=137470509-20022003><FONT face=Arial color=#0000ff
size=2>/magnus</FONT></SPAN></DIV>
<DIV><FONT face=Tahoma size=2><BR></FONT> </DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><FONT face=Arial size=2>Hi all,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2># 'master_host'<BR>define
command{<BR>
command_name
master_host<BR>
command_line /usr/lib/nagios/plugins/master_notify_host.pl
$HOSTNAME$ $HOSTSTATE$ $HOSTADDRESS$ $CONTACTEMAIL$ $NOTIFICATIONTYPE$
"$OUTPUT$" "$DATETIME$"<BR>
}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Some ideas? This thing is making me become old
very quickly :)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks guys,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Francesco Albrizio<BR>E-mail: <A
href="mailto:francesco.albrizio@init.it">francesco.albrizio@init.it</A><BR>Network
& Security Manager<BR>UNITEAM INIT<BR>InterNetworking & Information
Technology<BR>via Imperia, 2<BR>20142 MILANO<BR>Tel. 02-89546000<BR>Fax.
02-8467832</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>