I have been trying to get my custom plugin (simple script) to return appropriate return code based on warning and critical threshold.
Running this plugin manually (as shell script) returns expected results.
Code: Select all
root@server-1:/# /usr/local/nagios/libexec/check_heap_custom.sh -w 13839455574 -c 6919727787
java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.14.04.1)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)
OK
Code: Select all
root@server-1:/# grep heap /usr/local/nagios/etc nrpe.cfg
command[check_tomcat_heap]=sh /usr/local/nagios/libexec/check_jvm_custom.sh -w 1466538393 -c 1780796620
root@server-1:/# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_tomcat_heap
NRPE: Unable to read output
Thanks in advance for your inputs.