No output returned from NRPE (locally works)
Posted: Fri Sep 30, 2016 4:48 am
Hi.
I've two custom scripts that doesn't work with NRPE (many others works)
The commands (I tried in two diferents servers):
In both cases if I run in local its works:
In remote machine:
With 'nrpe' user:
Via NRPE in Nagios server (with nrpe.cfg correctly configured):
Thanks in advance.
regards.
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 remote machine:
Code: Select all
./check_jmx.sh
JMX OK HeapMemoryUsage.used=1530968840Code: Select all
su nrpe -c './check_jmx.sh' -s /bin/bash
JMX OK HeapMemoryUsage.used=1387879800Code: Select all
/usr/lib/nagios/plugins/check_nrpe -H myserver.com -c 'check_jmx'
CHECK_NRPE: No output returned from daemon.regards.