Page 1 of 3
NRPE: Unable to read output
Posted: Tue Feb 21, 2017 11:37 am
by rahul.srivastava1
Hi,
I have this command on the remote server in the nrpe.cfg file.
command[check_channels]=/usr/local/nagios/libexec/nagios-jmx-plugin-1.2.3/check_jmx -U service:jmx:rmi:///jndi/rmi://168.162.97.132:7780/jmxrmi -O echos.service:name=T.Q1.EBAM.OUT,type=service -A Status
If i run manually, it runs.
root@mint04 etc$ /usr/local/nagios/libexec/nagios-jmx-plugin-1.2.3/check_jmx -U service:jmx:rmi:///jndi/rmi://168.162.97.132:7780/jmxrmi -O echos.service:name=T.Q1.EBAM.OUT,type=service -A Status
JMX OK - Status = Started
But on the nagios dashboard, it shows the below error.
NRPE: Unable to read output
Can you advise please?
Regards,
Rahul
Re: NRPE: Unable to read output
Posted: Tue Feb 21, 2017 12:42 pm
by bwallace
See page 8 section VII of this doc. It directly addresses this particular error message:
https://assets.nagios.com/downloads/nag ... utions.pdf
Let us know if that helps to reveal the problem, thanks.
Re: NRPE: Unable to read output
Posted: Wed Feb 22, 2017 7:02 am
by rahul.srivastava1
Hi,
I have referred this document. But it did not help. Seems all the possibilities from the document are in place.
Please advise.
Regards,
Rahul
Re: NRPE: Unable to read output
Posted: Wed Feb 22, 2017 1:38 pm
by dwhitfield
Section VII of that document points you to Section IV of that same document if the other things check out in that section. Did you also look through Section IV?
Can you post your nrpe.cfg for review? If you have sensitive info, you can scrub or PM. If you PM, please make sure you update the post saying you have done so.
What version of Core are you using? Was it compiled from source or installed from distro repos? On what OS/version is nagios running? cat /etc/*-release may be of use. On what OS/version is the check running? What version of NRPE are you running?
Re: NRPE: Unable to read output
Posted: Thu Feb 23, 2017 9:24 am
by rahul.srivastava1
Hi,
Yes, i did check the section IV. But it did not help.
I have attached my nrpe.cfg file.
I am using nagios core 4.0.4.
It was compiled from source.
OS version -
Nagios' server - RedHat 6.2
Remote server - Solaris 10 (5.10 Generic_150400-40 sun4v sparc SUNW,Sun-Fire-T200)
NRPE version - NRPE v2.15
Let me know if i can provide more details.
Regards,
Rahul
Re: NRPE: Unable to read output
Posted: Thu Feb 23, 2017 5:39 pm
by tgriep
Can you login to the remote system and change to the nagios user by running the following
Them run your command as the nagios user and post the output.
Code: Select all
/apps/nagios/libexec/nagios-jmx-plugin-1.2.3/check_jmx -U service:jmx:rmi:///jndi/rmi://168.162.97.143:7780/jmxrmi -O echos.service:name=Q1.EBAM2.OUT,type=service -A Status -c "^Started.*|Disabled.*"
I am guessing it may be a permission issue.
Re: NRPE: Unable to read output
Posted: Mon Feb 27, 2017 4:38 am
by rahul.srivastava1
Hi,
Here is the output when i run through nagios user.
[nagios@ssb-voor-01]:~ $ /apps/nagios/libexec/nagios-jmx-plugin-1.2.3/check_jmx -U service:jmx:rmi:///jndi/rmi://168.162.97.143:7780/jmxrmi -O echos.service:name=Email-Service,type=service -A Status -c "^Started.*|Disabled.*"
JMX OK - Status = Started
Regards,
Rahul
Re: NRPE: Unable to read output
Posted: Mon Feb 27, 2017 5:05 am
by rahul.srivastava1
Hi,
The above command that i ran was from the remote server.
I would like to share that the nagios server is not reading the output.
See below, when i try to run the command from nagios server to this remote server, i get this:
-bash-4.1# ./check_nrpe -H 168.162.97.143 -c check_jmxmemory
NRPE: Unable to read output
168.162.97.143 is my remote server which i am trying monitor from nagios server.
Regards,
Rahul
Re: NRPE: Unable to read output
Posted: Mon Feb 27, 2017 10:33 am
by tgriep
The check_jmxmemory command that is defined in the nrpe.cfg file on the remote server looks like it is missing part of the path to the plugin.
Edit the nrpe.cfg file and change this from
Code: Select all
command[check_jmxmemory]=/apps/nagios/libexec/check_jmx -U service:jmx:rmi:///jndi/rmi://168.162.97.143:7780/jmxrmi -O jboss.system:type=ServerInfo -A TotalMemory -w 3247300864 -c 3251495168
to
Code: Select all
command[check_jmxmemory]=/apps/nagios/libexec/nagios-jmx-plugin-1.2.3/check_jmx -U service:jmx:rmi:///jndi/rmi://168.162.97.143:7780/jmxrmi -O jboss.system:type=ServerInfo -A TotalMemory -w 3247300864 -c 3251495168
Save the file and restart the NRPE agent on the remote server.
Then test it again from the Nagios server and let us know how it works.
Re: NRPE: Unable to read output
Posted: Tue Feb 28, 2017 11:01 am
by rahul.srivastava1
Hi,
There was a confusion initially.
I am indeed using the below command in the nrpe.cfg.
/apps/nagios/libexec/nagios-jmx-plugin-1.2.3/check_jmx -U service:jmx:rmi:///jndi/rmi://168.162.97.143:7780/jmxrmi -O jboss.system:type=ServerInfo -A TotalMemory -w 3247300864 -c 3251495168
This is running on the remote server.
root@ssb-voor-01 etc$ /apps/nagios/libexec/nagios-jmx-plugin-1.2.3/check_jmx -U service:jmx:rmi:///jndi/rmi://168.162.97.143:7780/jmxrmi -O jboss.system:type=ServerInfo -A TotalMemory -w 3247300864 -c 3251495168
JMX OK - TotalMemory = 3160408064 | 'TotalMemory'=3160408064;3247300864;3251495168;;
root@ssb-voor-01 etc$
But we are not able to run it from the nagios server.