Check_jmx plugin problem

Emmanuel Chanteloup manuchanteloup at gmail.com
Tue Apr 13 09:34:54 CEST 2010


Hi Natxo,

First, thank you for your time.

Here is my nrpe.conf :
_________________________________________________________________________________________________

log_facility=daemon

pid_file=/var/run/nrpe.pid

server_port=5666

nrpe_user=nagios

nrpe_group=nagios

dont_blame_nrpe=0


debug=1

command_timeout=60

connection_timeout=300

command[check_users]=/usr/local/nagios/libexec/check_users -w 10 -c 15
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c
30,25,20
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p
/dev/mapper/VolGroup00-LogVol00
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10
-s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 655 -c
700
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

_________________________________________________________________________________________________

all my commands are working except the check_jmx. Nrpe is running through
xinetd, here is my nrpe file in /etc/xinetd.d :

service nrpe
{
        flags           = REUSE
        socket_type     = stream
        port            = 5666
        wait            = no
        user            = nagios
        group           = nagios
        server          = /usr/local/nagios/bin/nrpe
        server_args     = -c /usr/local/nagios/etc/nrpe.cfg --inetd
        log_on_failure  += USERID
        disable         = no
        only_from       =  10.1.2.1 127.0.0.1 10.1.2.200
}

Regards,

emmanuel



2010/4/13 Natxo Asenjo <natxo.asenjo at gmail.com>

> On Tue, Apr 13, 2010 at 8:39 AM, Emmanuel Chanteloup
> <manuchanteloup at gmail.com> wrote:
> > The thing I do not understand is why I can run it directly with my nagios
> > account :
> >
> > [nagios at myserver ~]$ /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
> > JMX OK
> >
> HeapMemoryUsage.used=593227424{committed=1036189696;init=1073741824;max=1036189696;used=593227424}
> >
> > and it doesn't work with NRPE, knowing that NRPE is using the nagios
> account
> > !
> >
> > [nagios at myserver ~]$ /usr/local/nagios/libexec/check_nrpe -H localhost
> -c
> > check_jmx
> > NRPE: Unable to read output
>
> could you please post your nrpe.cfg (sanitize as needed) to make sure
> there is not a typo in it? (I've had that many times myself, very
> frustrating).
>
> Another option worth exploring is
> http://search.cpan.org/~roland/jmx4perl-0.65/scripts/check_jmx4perl<http://search.cpan.org/%7Eroland/jmx4perl-0.65/scripts/check_jmx4perl>
> .
>
> Another thing: I am not sure how nrpe escapes the slashes (if at all)
> in the uri in that check. Try adding more on slash in front of every
> other slash. Just a wild shot, I know.
>
> --
> natxo
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when
> reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100413/851f7ad2/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list