I sent a new server this weekend. Its RHEL6x64, latest patches.
I installed the linux-nape from the link on my NXI server, which also is the latest.
On CPU, memory, open files its all NRPE unreadable... other items are fine
[root@nagios libexec]# ./check_nrpe -H x.x.x.x -c check_cpu_stats -a '-w 85 -c 95'
NRPE: Unable to read output
I ran the local check_cpu_stats.sh and got this:
[root@host1 libexec]# ./check_cpu_stats.sh
./check_cpu_stats.sh: line 139: [: 0.00: integer expression expected
./check_cpu_stats.sh: line 142: [: 0.00: integer expression expected
./check_cpu_stats.sh: line 152: [: 0.05: integer expression expected
./check_cpu_stats.sh: line 156: [: 0.05: integer expression expected
./check_cpu_stats.sh: line 160: [: 0.00: integer expression expected
./check_cpu_stats.sh: line 164: [: 99.90: integer expression expected
CPU STATISTICS OK: user=0.05% system=0.05% iowait=0.00% idle=99.90% | user=0.05% system=0.05% iowait=0.00%;30;100 idle=99.90%
So I am comparing this device to a working device I setup a week ago, which is the same OS, and the modules seem to be the same.
My NXI GUI the setting commands look the same. One works one does not. I did update my wizard to the latest version as well.
So at this point I have manually/locally run checks and I get feedback from both, locally
Also, just an FYI, the nrpe install script is overwriting the iptable files. I had two entries in mine.... the time i installed the agent. Beautiful!!
# Generated by iptables-save v1.4.7 on Sat Feb 28 12:48:05 2015
*filter
:INPUT ACCEPT [5:260]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -p tcp -m state --state NEW -m tcp --dport 5667 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 5666 -j ACCEPT
COMMIT
# Completed on Sat Feb 28 12:48:05 2015
CPU, Memory staus = NRPE Unable to read output
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: CPU, Memory staus = NRPE Unable to read output
Basically the script is getting bash to compare non integer numbers (numbers with decimal places) and bash complains about this.
To correct the problem, I've adjusted the script so the numbers it's comparing are integers ... I'm basically removing anything after the .
This update script should work for you:
To correct the problem, I've adjusted the script so the numbers it's comparing are integers ... I'm basically removing anything after the .
This update script should work for you:
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: CPU, Memory staus = NRPE Unable to read output
Thanks for the update. I'll give it a shot. However, I'm not sure it's my underlying issue. Seems my working server is displaying the same results when run on the local host. There is something else causing my results to not be passed back to NXI. I'm just not sure what at this point.
Re: CPU, Memory staus = NRPE Unable to read output
Regarding "NRPE: Unable to read output", this could be caused by a variety of things. It is common that the issue could be related to permissions or SELinux Policy.
For SELinux, you could try:
If getenforce is Enforcing, you could temporarily disable it with:
After disabling SELinux, retry the procedure.
If SELinux isn't the culprit, be sure that the permissions for the files on your remote machine are set properly:
The permissions should match the rest of the files in libexec (755 perms).
This could also be caused by sudo issues. Please report the following:
Also, try running the check through NRPE using the remote host:
Please report back and let us know the results of the above. Thanks very much!
For SELinux, you could try:
Code: Select all
getenforceCode: Select all
setenforce 0If SELinux isn't the culprit, be sure that the permissions for the files on your remote machine are set properly:
Code: Select all
ls -lZ /usr/local/nagios/libexecThis could also be caused by sudo issues. Please report the following:
Code: Select all
cat /etc/sudoers | grep ttyCode: Select all
/usr/local/nagios/libexec/check_nrpe -H localhost -c mypluginRe: CPU, Memory staus = NRPE Unable to read output
Ahhh.... SELINUX was disabled, but was not when I installed the agent. So those files permissions were set 750.
Thank you sir!
Thank you sir!
Re: CPU, Memory staus = NRPE Unable to read output
Not a problem. I'll go ahead and lock this case out. Thanks!