<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Arial Unicode MS";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"Comic Sans MS";
        panose-1:3 15 7 2 3 3 2 2 2 4;}
@font-face
        {font-family:"Book Antiqua";
        panose-1:2 4 6 2 5 3 5 3 3 4;}
@font-face
        {font-family:"Bookman Old Style";
        panose-1:2 5 6 4 5 5 5 2 2 4;}
@font-face
        {font-family:"\@Arial Unicode MS";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Yes Marcel, scripts owned by nagios  and they have execute
permission.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:#1F497D'>Thank you</span><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Comic Sans MS";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-family:"Comic Sans MS";color:purple'>Murali
Edula<o:p></o:p></span></p>

<p class=MsoNormal><b><span style='font-family:"Bookman Old Style","serif";
color:#002060'>Baytree Associates, Inc.</span></b><span style='font-size:11.0pt;
font-family:"Bookman Old Style","serif";color:#002060'> <br>
</span><b><span style='font-size:11.0pt;font-family:"Book Antiqua","serif";
color:blue'>704.424.9723 ext. 117| 203-809-6725 Cell</span></b><span
style='font-size:11.0pt;font-family:"Book Antiqua","serif";color:blue'> <br>
<b>13925 Ballantyne Corporate Place Suite 190, </b><b><o:p></o:p></b></span></p>

<p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Book Antiqua","serif";
color:blue'>Charlotte, NC 28277-2747</span></b><span style='font-size:11.0pt;
font-family:"Book Antiqua","serif";color:blue'> <br>
</span><b><span style='font-size:11.0pt;font-family:"Book Antiqua","serif";
color:#002060'>medula@baytree.com | <a href="http://www.baytree.com"><span
style='color:#002060;font-weight:normal'>www.baytree.com</span></a></span></b><span
style='font-size:11.0pt;font-family:"Book Antiqua","serif";color:#1F497D'><o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
nagios-users-bounces@lists.sourceforge.net
[mailto:nagios-users-bounces@lists.sourceforge.net] <b>On Behalf Of </b>Marcel<br>
<b>Sent:</b> Wednesday, August 20, 2008 12:11 PM<br>
<b>To:</b> Joerg Linge<br>
<b>Cc:</b> nagios-users@lists.sourceforge.net<br>
<b>Subject:</b> Re: [Nagios-users] send_nsca - help<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'>Yo,<o:p></o:p></p>

<div>

<p class=MsoNormal>On Tue, Aug 19, 2008 at 5:31 PM, Joerg Linge <<a
href="mailto:pitchfork@ederdrom.de">pitchfork@ederdrom.de</a>> wrote:<o:p></o:p></p>

<p class=MsoNormal>Murali Edula schrieb:<o:p></o:p></p>

<div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'>> Hi,<br>
><br>
><br>
><br>
> we are in the process of configuring Nagios monitoring tool in<br>
> distribution model.<br>
><br>
> So I have configured nsca daemon on centrol server and send_nsca on<br>
> distributed server.<br>
><br>
> *Versions : Nagios 3.0.3, nsca 2.7.2 – I hope these are latest versions.*<br>
><br>
><br>
><br>
><br>
><br>
> 1.       Daemon configured fine and listening requests.<br>
><br>
> 2.       Send_nsca also working great if I ran stand alone
on<br>
> distribution server . Example<br>
><br>
> ./send_nsca -H <a href="http://10.1.1.216" target="_blank">10.1.1.216</a>
-c /usr/local/nagios/etc/send_nsca.cfg<br>
> <a href="http://abc.baytree.com" target="_blank">abc.baytree.com</a>
'Current Users' 0 'User count OK'<br>
><br>
><br>
><br>
> But when I configure ocsp_command is not working. Nagios.log shows follows<br>
><br>
><br>
><br>
> ============================================<br>
><br>
> [1219176254] Warning: Attempting to execute the command<br>
> "/usr/local/nagios/libexec/eventhandlers/send_service_check<br>
> <a href="http://abc.baytree.com" target="_blank">abc.baytree.com</a>
'Current Users' 0 'USERS OK - 11 users currently logged<br>
> in'" resulted in a return code of 127.  Make sure the script or
binary<br>
> you are trying to execute actually exists...<br>
><br>
><br>
><br>
> ===============================================<br>
><br>
><br>
><br>
><br>
><br>
> Please help me if I am missing anything here.<br>
><br>
><br>
><br>
> My ocsp entries Nagios.cfg – distributed server<br>
><br>
><br>
><br>
> obsess_over_services=1<br>
><br>
> obsess_over_hosts=1<br>
><br>
> ocsp_command=send_service_check<br>
><br>
> ochp_command=send_host_check<br>
><br>
> ocsp_timeout=5<br>
><br>
> ochp_timeout=5<br>
><br>
><br>
><br>
> ================================================<br>
><br>
><br>
><br>
> commands.cfg<br>
><br>
> define command{<br>
><br>
> command_name                
  send_service_check<br>
><br>
> command_line                
  $USER1$/eventhandlers/send_service_check<br>
> $HOSTNAME$ '$SERVICEDESC$' $SERVICESTATEID$ '$SERVICEOUTPUT$'<br>
><br>
>               }<br>
><br>
><br>
><br>
> =======================================================<br>
><br>
> Code – Shell script<br>
><br>
> /usr/local/nagios/libexec/eventhandles/ send_service_check<br>
><br>
><br>
><br>
><br>
><br>
> #!/bin/bash<br>
><br>
> # Script : send_service_check<br>
><br>
> #PRINTF="/usr/bin/printf"<br>
><br>
> CMD="/usr/local/nagios/bin/send_nsca"<br>
><br>
> CFG="/usr/local/nagios/etc/send_nsca.cfg"<br>
><br>
> HOST=$1<br>
><br>
> SRV=$2<br>
><br>
> RESULT=$3<br>
><br>
> OUTPUT=$4<br>
><br>
> #<br>
><br>
> /bin/echo "$1","$2","$3","$4" |
$CMD -H <a href="http://10.1.1.216" target="_blank">10.1.1.216</a> -c $CFG -d
","<br>
><o:p></o:p></p>

</div>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'>you call
eventhandlers/send_service_check but you script is named<br>
eventhandles/send_service_check<br>
<br>
<br>
Regards<br>
<br>
Joerg<o:p></o:p></p>

<div>

<p class=MsoNormal>############################################################################################<br>
And make sure your script is executable by nagios user.<br>
 <o:p></o:p></p>

</div>

</div>

<p class=MsoNormal><o:p> </o:p></p>

</div>

</div>

</body>

</html>