Page 2 of 2
Re: NRPE: Unable to read output - Custom Plugin Script
Posted: Tue Oct 10, 2017 11:46 am
by bolson
And please remember to issue:
Then run:
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
From the nrpe host and post the result.
Thank you!
Re: NRPE: Unable to read output - Custom Plugin Script
Posted: Tue Oct 10, 2017 12:16 pm
by pmoradiya
bolson wrote:The correct syntax differs between nrpe.cfg (comma delimited) and /etc/xinetd.d/nrpe (space delimited)
Are the hosts delimited by a space in /etc/xinetd.d/nrpe?
Yes. hosts are delimited by space in /etc/xinetd.d/nrpe
and by comma in nrpe.cfg
Code: Select all
allowed_hosts=127.0.0.1,10.0.0.208
Re: NRPE: Unable to read output - Custom Plugin Script
Posted: Tue Oct 10, 2017 12:47 pm
by bolson
Have you restarted the xinetd service and are you still experiencing the same issue?
Re: NRPE: Unable to read output - Custom Plugin Script
Posted: Tue Oct 10, 2017 12:59 pm
by pmoradiya
bolson wrote:Have you restarted the xinetd service and are you still experiencing the same issue?
That is correct.
I have also tried directly using check_jvm plugin and updated my NRPE command as below:
Code: Select all
command[check_tomcat_heap]=/usr/bin/sudo -u tomcat7 /usr/local/nagios/libexec/check_jvm -n org.apache.catalina.startup.Bootstrap -p heap -w 1466538393 -c 1780796620
root@prod-server-1:/usr/local/nagios/libexec# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_tomcat_heap
NRPE: Unable to read output
Re: NRPE: Unable to read output - Custom Plugin Script
Posted: Tue Oct 10, 2017 2:10 pm
by pmoradiya
Quick update..
It got resolved by adding the following line for nagios in sudoers file.
Code: Select all
nagios ALL=(ALL) NOPASSWD: /usr/local/nagios/libexec/
in place of..
Code: Select all
nagios ALL= NOPASSWD: /usr/local/nagios/libexec/
Code: Select all
root@prod-server-1:/usr/local/nagios/libexec# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_tomcat_heap
OK 882M |max=4151836672;;; commited=2028941312;;; used=924281928;;;
Thank you so much for your support and prompt responses.
-
PM
Re: NRPE: Unable to read output - Custom Plugin Script
Posted: Tue Oct 10, 2017 2:30 pm
by bolson
Glad to hear it. Thank you for using the Nagios Support Forum!