Hi Natxo,<br><br>First, thank you for your time.<br><br>Here is my nrpe.conf :<br>_________________________________________________________________________________________________<br><br>log_facility=daemon<br><br>pid_file=/var/run/nrpe.pid<br>
<br>server_port=5666<br><br>nrpe_user=nagios<br><br>nrpe_group=nagios<br><br>dont_blame_nrpe=0<br><br><br>debug=1<br><br>command_timeout=60<br><br>connection_timeout=300<br><br>command[check_users]=/usr/local/nagios/libexec/check_users -w 10 -c 15<br>
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20<br>command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/VolGroup00-LogVol00<br>command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z<br>
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 655 -c 700<br>command[check_jmx]=/usr/local/nagios/libexec/check_jmx -U service:jmx:rmi:///jndi/rmi://localhost:8999/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -I HeapMemoryUsage -J used -vvvv -w 800000000 -c 1500000000<br>
<br>_________________________________________________________________________________________________<br><br>all my commands are working except the check_jmx. Nrpe is running through xinetd, here is my nrpe file in /etc/xinetd.d :<br>
<br>service nrpe<br>{<br>        flags           = REUSE<br>        socket_type     = stream<br>        port            = 5666<br>        wait            = no<br>        user            = nagios<br>        group           = nagios<br>
        server          = /usr/local/nagios/bin/nrpe<br>        server_args     = -c /usr/local/nagios/etc/nrpe.cfg --inetd<br>        log_on_failure  += USERID<br>        disable         = no<br>        only_from       =  10.1.2.1 127.0.0.1 10.1.2.200<br>
}<br><br>Regards,<br><br>emmanuel<br><br><br><br><div class="gmail_quote">2010/4/13 Natxo Asenjo <span dir="ltr"><<a href="mailto:natxo.asenjo@gmail.com">natxo.asenjo@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Tue, Apr 13, 2010 at 8:39 AM, Emmanuel Chanteloup<br>
<<a href="mailto:manuchanteloup@gmail.com">manuchanteloup@gmail.com</a>> 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>
</div>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/%7Eroland/jmx4perl-0.65/scripts/check_jmx4perl" target="_blank">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>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">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" target="_blank">http://p.sf.net/sfu/intel-sw-dev</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" target="_blank">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></div></blockquote></div><br>