Page 1 of 1

No output returned from NRPE (locally works)

Posted: Fri Sep 30, 2016 4:48 am
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.

Re: No output returned from NRPE (locally works)

Posted: Fri Sep 30, 2016 9:48 am
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.