What am I missing? (NRPE: Unable to read output)
Re: What am I missing? (NRPE: Unable to read output)
I think the problem is with the ! in the output of the plugin. The ! is used as a delimiter in Nagios and that could cause the error.
Try replacing the check_mem on your system with the one in the link below and see if that works for you.
https://raw.githubusercontent.com/justi ... eck_mem.pl
Try replacing the check_mem on your system with the one in the link below and see if that works for you.
https://raw.githubusercontent.com/justi ... eck_mem.pl
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: What am I missing? (NRPE: Unable to read output)
Directions to install were from here: http://tecadmin.net/install-nrpe-on-centos-rhel/lmiltchev wrote:What commands did you run in order to install Nagios Plugins and NRPE?
It is very strange that the nagios user is not available...What is the output of the following commands?This account is currently not available.
Code: Select all
grep nag /etc/passwd grep nag /etc/group grep "nrpe_" /path/to/the/nrpe.cfg chage nagios -l
Same directions were used on each server.
I found it odd too that nagios wasn't available, but that's also consistent with the other servers.
grep nag /etc/passwd:
Code: Select all
nagios:x:498:499::/var/spool/nagios:/sbin/nologin
Code: Select all
nagios:x:499:
Code: Select all
nrpe_user=nrpe
nrpe_group=nrpe
Code: Select all
Last password change : Mar 08, 2016
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : -1
Maximum number of days between password change : -1
Number of days of warning before password expires : -1
Re: What am I missing? (NRPE: Unable to read output)
I had that one stored to use, just in case (though I think I got it from somewhere else). But anyway, I installed the check_mem.pl plugin. For grins, I also copied over the check_mem plugin from another server that is working fine. Both have the same owners/groups/privs as the rest of the plugins. Still same error after restarting NRPE.tgriep wrote:I think the problem is with the ! in the output of the plugin. The ! is used as a delimiter in Nagios and that could cause the error.
Try replacing the check_mem on your system with the one in the link below and see if that works for you.
https://raw.githubusercontent.com/justi ... eck_mem.pl
Updated NRPE.cfg as such:
Code: Select all
#command[check_mem]=/usr/lib64/nagios/plugins/check_mem -f -w 20 -c 10
command[check_mem]=/usr/lib64/nagios/plugins/check_mem.pl -w 20 -c 10
If I run the /usr/lib64/nagios/plugins/check_mem.pl -w 20 -c 10 from the client, I get the following:
Code: Select all
<b>CRITICAL: Memory Usage (W> 20, C> 10): 99% <br>Swap Usage (W> 100, C> 100): 0%</b>|MemUsed=99%;20;10 SwapUsed=0%;100;100
Re: What am I missing? (NRPE: Unable to read output)
What user did you run this as?aneah wrote: If I run the /usr/lib64/nagios/plugins/check_mem.pl -w 20 -c 10 from the client, I get the following:
Former Nagios Employee.
me.
me.
Re: What am I missing? (NRPE: Unable to read output)
root.hsmith wrote:What user did you run this as?aneah wrote: If I run the /usr/lib64/nagios/plugins/check_mem.pl -w 20 -c 10 from the client, I get the following:
Re: What am I missing? (NRPE: Unable to read output)
I also managed to find a way to su the Nagios account. For future reference for others, use the following command:hsmith wrote:What user did you run this as?aneah wrote: If I run the /usr/lib64/nagios/plugins/check_mem.pl -w 20 -c 10 from the client, I get the following:
Code: Select all
su - nagios -s /bin/bash
Code: Select all
<b>CRITICAL: Memory Usage (W> 20, C> 10): 99% <br>Swap Usage (W> 100, C> 100): 0%</b>|MemUsed=99%;20;10 SwapUsed=0%;100;100
Re: What am I missing? (NRPE: Unable to read output)
It looks like you have NRPE configured to run as the NRPE user instead of the nagios user, can you su to that user and try the check?
Former Nagios Employee.
me.
me.
Re: What am I missing? (NRPE: Unable to read output)
Exact same results as running as Nagios and root. In fact, the NRPE account gave the same error as the Nagios account and had to be run as I previously indicated.hsmith wrote:It looks like you have NRPE configured to run as the NRPE user instead of the nagios user, can you su to that user and try the check?
Code: Select all
<b>CRITICAL: Memory Usage (W> 20, C> 10): 99% <br>Swap Usage (W> 100, C> 100): 0%</b>|MemUsed=99%;20;10 SwapUsed=0%;100;100
In fact, I just copied over the check_mem plugin and NRPE.cfg files from another server (where things were functioning fine) and restarted the nrpe process and no change.
I'll be doing an update and reboot on the machine tonight. I'm hoping that automagically fixes this.
Re: What am I missing? (NRPE: Unable to read output)
Here's hoping.
Something to do would be compare the output of a cat /proc/meminfo command on both your working servers and a non working server to see if there is some weird formatting the plugin could be tripping on.
Something to do would be compare the output of a cat /proc/meminfo command on both your working servers and a non working server to see if there is some weird formatting the plugin could be tripping on.
Former Nagios Employee.
me.
me.
Re: What am I missing? (NRPE: Unable to read output)
Officially resolved as of tonight.
Cause: At this point, just speculation.
Remedy: Updated RHEL from 6.6 to 6.7 on the client and rebooted. When the server came back up, the error was gone.
Cause: At this point, just speculation.
Remedy: Updated RHEL from 6.6 to 6.7 on the client and rebooted. When the server came back up, the error was gone.