Just my two cents, but if ssh is available why not just use the check_by_ssh command to run the script and return the result. <br><br>
<br><div><span class="gmail_quote">On 8/4/05, <b class="gmail_sendername">Andreas Ericsson</b> <<a href="mailto:ae@op5.se">ae@op5.se</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<a href="mailto:Ralph.Grothe@itdz-berlin.de">Ralph.Grothe@itdz-berlin.de</a> wrote:<br>>>You're asking people to help you on their spare time. Most of<br>><br>> your<br>><br>>>questions so far have been either no-brainers that you would
<br>>>have been<br>>>able to figure out for yourself had you made the effort, or<br>>>of the kind<br>>>that would take considerable effort to answer properly.<br>><br>><br>> I know that I waste the time of people who are willing to help
<br>> me.<br>><br><br>I wasn't remarking on your questions per se, but the fact that you<br>seemed annoyed about an answer you got.<br><br>That said, I'll just cut to the chase.<br><br>><br>>>Did you log in as the NRPE user or did you just su? su'ing
<br>>>maintains the<br>>>environment settings of the old user, which will have effect on<br>><br>> some<br>><br>>>programs.<br>><br>><br>> No simple su-ing.<br>> Even if I had, I would have taken care to do a full "su -" to
<br>> also obtain the account's environment.<br>> I am and was logged in under the account that I configured inetd<br>> to run the nrpe server as<br>> (see 5th field, or 4th field for you)<br>><br>> [saz@inwo2
]<br>> $ id<br>> uid=102(saz) gid=20(users) groups=102(saz)<br>><br>> [saz@inwo2]<br>> $ grep nrpe /etc/inetd.conf<br>> nrpe    stream tcp nowait saz /usr/local/nagios/sbin/nrpe nrpe -c<br>> /usr/local/nagios/etc/nrpe.cfg -i
<br>><br>><br>><br>>>check_hpva.sh prints something to stderr. This causes the<br>>>NRPE daemon to<br>>>miscalculate the checksum. When the plugin does the same it<br>>>arrives at<br>>>an invalid result.
<br>><br>><br>><br>> My script isn't writing anything to stderr, and it's outputting a<br>> single line to stdout<br>> (which is I think is in accordance to plug-in developer's<br>> guidelines)<br>>
<br><br>Indeed it is. However, one or more of the commands executed may print<br>something to stderr, which will show up as stderr output.<br><br>><br>> [saz@inwo2]<br>> $ /usr/local/nagios/libexec/check_hpva.sh 2>/dev/null | cat -n
<br>>      1  OK:     HP Virtual Array "va" on inwo2 all FRUs State<br>> Good<br>><br><br>Not good. Or more accurate; Perhaps good. You're redirecting stderr to<br>/dev/null, so it's impossible to know if the script (or any of its
<br>commands) print anything to it.<br><br>--<br>Andreas
Ericsson                  
<a href="mailto:andreas.ericsson@op5.se">andreas.ericsson@op5.se</a><br>OP5
AB                            
<a href="http://www.op5.se">www.op5.se</a><br>Lead Developer<br><br><br>-------------------------------------------------------<br>SF.Net email is Sponsored by the Better Software Conference & EXPO<br>September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
<br>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA<br>Security * Process Improvement & Measurement * <a href="http://www.sqe.com/bsce5sf">http://www.sqe.com/bsce5sf</a><br>_______________________________________________
<br>Nagios-users mailing list<br><a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users
</a><br>::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>