<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-15">
<META content="MSHTML 6.00.2900.5726" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>I've had similar problems with nrpe where the command string doesn't get</DIV>
<DIV>passed intact but instead some non letter characters get "processed" somewhere</DIV>
<DIV>within nrpe, so running it directly and through nrpe give different results.</DIV>
<DIV>Try putting a \ in front of every unusual character</DIV>
<DIV> </DIV>
<DIV>Paul Willis <BR><BR>>>> Natxo Asenjo <natxo.asenjo@gmail.com> 13/04/10 08:12 >>><BR>On Tue, Apr 13, 2010 at 8:39 AM, Emmanuel Chanteloup<BR><manuchanteloup@gmail.com> wrote:<BR>> The thing I do not understand is why I can run it directly with my nagios<BR>> account :<BR>><BR>> [nagios@myserver ~]$ /usr/local/nagios/libexec/check_jmx -U<BR>> service:jmx:rmi:///jndi/rmi://localhost:8999/jmxrmi -O java.lang:type=Memory<BR>> -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -vvvv -w 800000000 -c<BR>> 1500000000<BR>> JMX OK<BR>> HeapMemoryUsage.used=593227424{committed=1036189696;init=1073741824;max=1036189696;used=593227424}<BR>><BR>> and it doesn't work with NRPE, knowing that NRPE is using the nagios account<BR>> !<BR>><BR>> [nagios@myserver ~]$ /usr/local/nagios/libexec/check_nrpe -H localhost -c<BR>> check_jmx<BR>> NRPE: Unable to read output<BR><BR>could you please post your nrpe.cfg (sanitize as needed) to make sure<BR>there is not a typo in it? (I've had that many times myself, very<BR>frustrating).<BR><BR>Another option worth exploring is<BR><A href="http://search.cpan.org/~roland/jmx4perl-0.65/scripts/check_jmx4perl.">http://search.cpan.org/~roland/jmx4perl-0.65/scripts/check_jmx4perl.</A><BR><BR>Another thing: I am not sure how nrpe escapes the slashes (if at all)<BR>in the uri in that check. Try adding more on slash in front of every<BR>other slash. Just a wild shot, I know.<BR><BR>-- <BR>natxo<BR><BR>------------------------------------------------------------------------------<BR>Download Intel&#174; Parallel Studio Eval<BR>Try the new software tools for yourself. Speed compiling, find bugs<BR>proactively, and fine-tune applications for parallel performance.<BR>See why Intel Parallel Studio got high marks during beta.<BR><A href="http://p.sf.net/sfu/intel-sw-dev">http://p.sf.net/sfu/intel-sw-dev</A><BR>_______________________________________________<BR>Nagios-users mailing list<BR>Nagios-users@lists.sourceforge.net<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></DIV></BODY></HTML>