Hi,
[root@client_nrpe ~]# su nrpe
bash-4.1$ /usr/bin/sudo /usr/local/nagios/libexec/check_swap -w 20% -c 10%
SWAP OK - 100% free (4076 MB out of 4094 MB) |swap=4076MB;818;409;0;4094
bash-4.1$ /usr/local/nagios/libexec/check_swap -w 20% -c 10%
SWAP OK - 100% free (4076 MB out of 4094 MB) |swap=4076MB;818;409;0;4094
I delete sudo fo rcheck_swap and now working, but don't working check_jmeter, I delete sudo for check_jmeter too.
I think nrep user is right because I see into /var/log/messages this output :
Nov 16 13:34:52 client_nrpe nrpe[1154]: Running command: /usr/local/nagios/libexec/check_swap -w 20% -c 10%
Nov 16 13:34:52 client_nrpe nrpe[1154]: Command completed with return code 0 and output: SWAP OK - 100% free (4076 MB out of 4094 MB) |swap=4076MB;818;409;0;4094
Nov 16 13:34:52 client_nrpe nrpe[1154]: Return Code: 0, Output: SWAP OK - 100% free (4076 MB out of 4094 MB) |swap=4076MB;818;409;0;4094
Nov 16 13:34:52 client_nrpe nrpe[1154]: Connection from pn▒▒▒#177 closed.
Nov 16 13:35:01 client_nrpe nrpe[1181]: Connection from 10.10.10.10 port 19111
Nov 16 13:35:01 client_nrpe nrpe[1181]: Host address is in allowed_hosts
Nov 16 13:35:01 client_nrpe nrpe[1181]: Handling the connection...
Nov 16 13:35:01 client_nrpe nrpe[1181]: Host is asking for command 'check_jmeter' to be run...
Nov 16 13:35:01 client_nrpe nrpe[1181]: Running command: /usr/local/nagios/libexec/check_site.sh
Nov 16 13:35:01 client_nrpe nrpe[1181]: Command completed with return code 1 and output:
Nov 16 13:35:01 client_nrpe nrpe[1181]: Return Code: 1, Output: NRPE: Unable to read output
Nov 16 13:35:01 client_nrpe nrpe[1181]: Connection from pn▒▒▒#177 closed.
Thanks.
Natalia
NRPE: Unable to read output
Re: NRPE: Unable to read output
Try doing the same test for the check_site.sh script.
Login to that remote host, run the following and post the errors.
Login to that remote host, run the following and post the errors.
Code: Select all
su nrpe
/usr/bin/sudo /usr/local/nagios/libexec/check_site.sh -w 15 -c 20
/usr/local/nagios/libexec/check_site.sh -w 15 -c 20
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 29
- Joined: Mon Aug 22, 2016 8:14 am
Re: NRPE: Unable to read output
Hi,
[root@client_nrpe ~]# su nrpe
bash-4.1$ /usr/bin/sudo /usr/local/nagios/libexec/check_site.sh -w 15 -c 20
OK : sum:2052 : 2.052 seconds to complete.
bash-4.1$ /usr/local/nagios/libexec/check_site.sh -w 15 -c 20
OK : sum:2144 : 2.144 seconds to complete.
bash-4.1$ sudo /usr/local/nagios/libexec/check_nrpe -H 10.10.10.10 -c check_jmeter
NRPE: Unable to read output
bash-4.1$ /usr/local/nagios/libexec/check_nrpe -H 10.10.10.10 -c check_jmeter
NRPE: Unable to read output
Thanks.
Natalia
[root@client_nrpe ~]# su nrpe
bash-4.1$ /usr/bin/sudo /usr/local/nagios/libexec/check_site.sh -w 15 -c 20
OK : sum:2052 : 2.052 seconds to complete.
bash-4.1$ /usr/local/nagios/libexec/check_site.sh -w 15 -c 20
OK : sum:2144 : 2.144 seconds to complete.
bash-4.1$ sudo /usr/local/nagios/libexec/check_nrpe -H 10.10.10.10 -c check_jmeter
NRPE: Unable to read output
bash-4.1$ /usr/local/nagios/libexec/check_nrpe -H 10.10.10.10 -c check_jmeter
NRPE: Unable to read output
Thanks.
Natalia
Re: NRPE: Unable to read output
Try and remove the sudo from the command in the /usr/local/nagios/libexec/check_site.sh script on the remote host and see if that works for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 29
- Joined: Mon Aug 22, 2016 8:14 am
Re: NRPE: Unable to read output
Hi,
I try it but nothing, the output is same:
[root@client_nrpe ~]# su nrpe
bash-4.1$ /usr/local/nagios/libexec/check_nrpe -H localhost -c check_jmeter
NRPE: Unable to read output
[root@client_nrpe ~]# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_jmeter
NRPE: Unable to read output
Thanks.
Natalia
I try it but nothing, the output is same:
[root@client_nrpe ~]# su nrpe
bash-4.1$ /usr/local/nagios/libexec/check_nrpe -H localhost -c check_jmeter
NRPE: Unable to read output
[root@client_nrpe ~]# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_jmeter
NRPE: Unable to read output
Thanks.
Natalia
-
- Posts: 29
- Joined: Mon Aug 22, 2016 8:14 am
Re: NRPE: Unable to read output
Hi,
I solved my problem:
I put "Defaults:nrpe !requiretty " on the sudoers file config
[root@client_nrpe ~]# grep nrpe /etc/sudoers
Defaults:nrpe !requiretty
[root@client_nrpe ~]# /usr/local/nagios/libexec/check_nrpe -H 10.10.10.10 -c check_jmeter
OK : sum:2423 : 2.423 seconds to complete.
Thanks everyone.
Regards.
Natalia.
I solved my problem:
I put "Defaults:nrpe !requiretty " on the sudoers file config
[root@client_nrpe ~]# grep nrpe /etc/sudoers
Defaults:nrpe !requiretty
[root@client_nrpe ~]# /usr/local/nagios/libexec/check_nrpe -H 10.10.10.10 -c check_jmeter
OK : sum:2423 : 2.423 seconds to complete.
Thanks everyone.
Regards.
Natalia.
-
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: NRPE: Unable to read output
Glad to hear it is resolved. I am going to lock the thread. Please feel free to post again if you have you another issue. Thank you for using the Nagios forums!