No output returned from NRPE (locally works)

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
jose_a_guardia
Posts: 13
Joined: Fri Dec 04, 2015 2:40 am

No output returned from NRPE (locally works)

Post by jose_a_guardia »

Hi.

I've two custom scripts that doesn't work with NRPE (many others works)

The commands (I tried in two diferents servers):

Code: Select all

echo "$(/usr/local/nagios/libexec/./check_jmx  -U service:jmx:rmi:///jndi/rmi://$url:$port/jmxrmi -O java.lang:type=Memory -A HeapMemoryUsage -K used -u B -w $warning_level -c $critical_level | cut -d= -f2)"

echo "$(dd if=/dev/zero of=/tmp/output.img bs=4k count=512k conv=fdatasync 2>&1 | awk '/bytes/{print $(NF-1), $NF}' | cut -d' ' -f1; rm -rf /tmp/output.img )"
In both cases if I run in local its works:

In remote machine:

Code: Select all

./check_jmx.sh
JMX OK HeapMemoryUsage.used=1530968840
With 'nrpe' user:

Code: Select all

su nrpe -c './check_jmx.sh' -s /bin/bash
JMX OK HeapMemoryUsage.used=1387879800
Via NRPE in Nagios server (with nrpe.cfg correctly configured):

Code: Select all

/usr/lib/nagios/plugins/check_nrpe -H myserver.com -c 'check_jmx'
CHECK_NRPE: No output returned from daemon.
Thanks in advance.

regards.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: No output returned from NRPE (locally works)

Post by tmcdonald »

I'd run through our NRPE troubleshooting doc:

https://assets.nagios.com/downloads/nag ... utions.pdf

95% of issues we have come across are documented there. Take a look, let us know what you have tried if you still cannot get it working.
Former Nagios employee
Locked