<div>How can I run the check_nrpe on the local server?</div>
<div>Please provide me the info. will it be running as a service like nrpe in the local server, or is it something else ,Please clarify</div>
<div>Here is the content of the script residing on the remote server I am doing just a simple check using the currently used files.</div>
<div>#!/usr/bin/perl<br>use Getopt::Long;</div>
<p>############################ Impact ###################################<br>$PathOfBaselineFile = "/local/netcool/nagios/baseline";</p>
<p><br>my %ERRORS=('OK'=>0,'WARNING'=>1,'CRITICAL'=>2,'UNKNOWN'=>3,'DEPENDENT'=>4);<br>#Argument processing<br>my $args = GetOptions (<br> "paname|p=s" => \$paname);<br>
$pa = substr($paname,0,6);</p>
<p>if($paname ne '') {<br>##### parameter check<br>if (( -e "/usr1/netcool/omnibus/etc/$paname.conf") && ( -e "$PathOfBaselineFile/$paname.conf"))<br>{<br> $imp_cmd = `cat /usr1/netcool/omnibus/etc/$paname.conf | grep ncoadmin | egrep -v lmgrd | egrep -v DeackStuckEvents.sh`;<br>
$imp_cmd_base = `cat $PathOfBaselineFile/$paname.conf | grep ncoadmin | egrep -v lmgrd | egrep -v DeackStuckEvents.sh`;<br> if($imp_cmd eq $imp_cmd_base)<br> {<br> print "OK: Impact Command line is same ! \n";<br>
}<br> else<br> {<br> print "CRITICAL: Impact Command line is not same ! \n";<br> exit $ERRORS{'CRITICAL'};<br> }<br>}<br>else<br>{<br> print "$paname configuration file doesn't exist!","\n";<br>
exit $ERRORS{'CRITICAL'};<br>}<br></p>
<div> </div>
<div>Thanks,</div>
<div>Amit<br> </div>
<div><span class="gmail_quote">On 3/30/09, <b class="gmail_sendername">Amit Kumar</b> <<a href="mailto:risinamit@gmail.com">risinamit@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>A application is running on remote server ,I want to execute a perl script on that remote server to cehck it's availability and other stuffs locally on that remote server and whatever output comes after the execution of that script it should be available on the nagios local monitoring server: Please help me out, I have done following steps:</div>
<div> </div>
<div>Modification on Local Nagios Server:</div>
<div>1. /usr/local/nagios/nrpe.cfg made an entry like :</div>
<div> </div>
<div> command[check_nrpe]=/usr/local/nagios/libexec/check_nrpe -H <REMOTESERVER_IP></div>
<div> </div>
<div>2. /usr/local/nagios/etc/objects/services.cfg made a following entry</div>
<div> define service{<br> use generic-service<br> service_description Netcool status<br> check_command check_nrpe!check_impact<br>}<br>restarted the nagios server and the nrpe server on Nagios localserver</div>
<div> </div>
<div> </div>
<div> </div>
<div>Modification done on the remote server</div>
<div>1. /usr/local/nagios/nrpe.cfg made an entry like :</div>
<div> </div>
<div> command[check_impact]=/root/amit/nagioscheck/nagios_impact.pl -p=<PROCESS_NAME></div>
<div> this perl script resides on the remote server </div>
<div>restarted the nrpe server on remote server.</div>
<div> </div>
<div> </div>
<div>Now My question is how can I get this working? I tried most of the things available on internet but nothing seems to be working.</div>
<div>Am I missing any step or any local configuration , then please specify. It is giving me hard time</div>
<div><br>NRPE version is same on both remote and local nagios server i.e 2.0 and the check_nrpe utlity version on the local nagios server is also 2.0. </div>
<div>Please help me for the same.</div>
<div>Thanks in advance,</div>
<div> </div><span class="sg">
<div> </div>
<div>Amit Kumar</div>
<div><br> </div>
<div> </div>
<div> </div>
<div> </div></span></blockquote></div><br>