<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.34">
<TITLE>More than one command defined </TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2 FACE="Arial">Hi, </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I have a need to run two different commands when processing the performance data from Nagios (3.2.2) </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I want the first command to run the process-perfdata.pl script from pnp4nagios and the second command to log various things to a different log file. </FONT></P>
<P><FONT SIZE=2 FACE="Arial">The reason is that we've only just had a requirement to process performance data for pnp4nagios graphing. But historically we've created our own "performance data" log </FONT></P>
<P><FONT SIZE=2 FACE="Arial">which is then used within a database to produce SLA reports developed in-house (no graphing just numbers produced for the SLA reports) </FONT></P>
<P><FONT SIZE=2 FACE="Arial">If I do the following I don't get an errors when I run nagios -v nagios.cfg ... :- </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">define command {</FONT>
<BR><FONT SIZE=2 FACE="Arial"> command_name process-service-perfdata-file</FONT>
<BR><FONT SIZE=2 FACE="Arial"> command_line <first command> - process performance data for pnp4nagios</FONT>
<BR><FONT SIZE=2 FACE="Arial"> command_line <second command> - log different data to a different file </FONT>
<BR><FONT SIZE=2 FACE="Arial"> }</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I'd like to avoid creating a script with both commands in if I can help it as it's extremely useful to keep it simple and visible in the misccommands.cfg file. </FONT></P>
<P><FONT SIZE=2 FACE="Arial">Perhaps there is some other way I can do this or is a script with both commands really the only way ? </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Any help / pointers would be really appreciated. If I'm being dense about this and the answer is staring right at me feel free to say so! </FONT></P>
<P><FONT SIZE=2 FACE="Arial">Thanks, </FONT>
<BR><FONT SIZE=2 FACE="Arial">Deborah </FONT>
</P>
<BR>
***************************************************************************<BR>
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. <BR>
<BR>
Any unauthorised distribution or copying is strictly prohibited. <BR>
Whilst Kognitio Limited takes steps to prevent the transmission of viruses via e-mail, we can not guarantee that any email or attachment is free from computer viruses and you are strongly advised to undertake your own anti-virus precautions. <BR>
<BR>
Kognitio grants no warranties regarding performance, use or quality of any e-mail or attachment and undertakes no liability for loss or damage, howsoever caused. <BR>
<BR>
Kognitio Limited, a company registered in England and Wales. Registered number 0212 7833. Registered Office: 3a Waterside Park, Cookham Road, Bracknell, Berks, RG12 1RB. VAT number 864 4378 92.<BR>
<BR>
Kognitio Inc, a company incorporated in Delaware, principal office 180 North Stetson, Suite 3500, Chicago, IL 60601, USA<BR>
***************************************************************************<BR>
</BODY>
</HTML>