NRPE: Unable to read output

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
rahul.srivastava1
Posts: 21
Joined: Mon Feb 06, 2017 6:44 am

NRPE: Unable to read output

Post 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
bwallace
Posts: 1146
Joined: Tue Nov 17, 2015 1:57 pm

Re: NRPE: Unable to read output

Post 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.
Be sure to check out the Knowledgebase for helpful articles and solutions!
rahul.srivastava1
Posts: 21
Joined: Mon Feb 06, 2017 6:44 am

Re: NRPE: Unable to read output

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: NRPE: Unable to read output

Post 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?
rahul.srivastava1
Posts: 21
Joined: Mon Feb 06, 2017 6:44 am

Re: NRPE: Unable to read output

Post 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
Attachments
nrpe.cfg
(8.31 KiB) Downloaded 363 times
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: NRPE: Unable to read output

Post by tgriep »

Can you login to the remote system and change to the nagios user by running the following

Code: Select all

su nagios
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rahul.srivastava1
Posts: 21
Joined: Mon Feb 06, 2017 6:44 am

Re: NRPE: Unable to read output

Post 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
rahul.srivastava1
Posts: 21
Joined: Mon Feb 06, 2017 6:44 am

Re: NRPE: Unable to read output

Post 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
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: NRPE: Unable to read output

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rahul.srivastava1
Posts: 21
Joined: Mon Feb 06, 2017 6:44 am

Re: NRPE: Unable to read output

Post 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.
Locked