Nagios Monitoring Internal error nrpe:unable to read output resolution!
Due to writing Check_mem monitoring script, alarm in monitor: nrpe:unable to read output, other monitoring items are normal
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/30/ED/wKiom1Opl1mgBn09AABEsqqPBFg504.jpg "title=" 03n1 ' Z _}vly3zn_d$8gm8vp.jpg "alt=" Wkiom1opl1mgbn09aabesqqpbfg504.jpg "/>
The preliminary cognizance is that Nagios has no authority to implement the Check_mem script;
1. Monitor client memory in monitoring host, encounter nrpe:unable to read output
#/usr/local/nagios/libexec/check_nrpe-h 1192.168.1.10-c Check_mem
Nrpe:unable to read output
2. Since the monitor can detect other items of the client, the Nrpedaemon communication between the monitor and the monitored machine is normal.
Try: A. chmod 777 Check_mem Chown Nagios:nagios check_mem
====> found or not;
3. Try running the script with the Naigos user shell:
#usermod-S/bin/bash nagios
#su-nagios
[[Email protected]]$/usr/local/nagios/libexec/check_mem-w 10-c 5
650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s3.51cto.com/wyfs02/m01/30/eb/wkiom1opj7kaneadaam2sq5ltro663.jpg "title=" @78hg$}f@gn7{9f%6h) PCR2.jpg "alt=" Wkiom1opj7kaneadaam2sq5ltro663.jpg "/>
Insufficient permissions appear. It is possible to judge that the permissions of Nagios to run the script are insufficient. Try using sudo permissions.
# vi/etc/sudoers
Add to:
Nagios all= (All) Nopasswd:/usr/local/nagios/libexec/check_mem
Note: For security reasons, add only monitoring scripts that are allowed to run, and set the script to be non-writable.
Re-run sudo
#su-nagios
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/30/ED/wKiom1OpliKhAMYpAAMMr8Ad9Bo375.jpg "title=" 2.jpg " alt= "Wkiom1oplikhamypaammr8ad9bo375.jpg"/>
4. Finally, edit the nrpe.cfg inside the commands command:
#vim/usr/local/nagios/etc/nrpe.cfg
command[check_mem]=/usr/bin/sudo /usr/local/nagios//libexec/check_mem-w 20-c 10
If the above command is not possible, change to the following;
Command[check_mem]=/usr/local/nagios//libexec/check_mem-w 20-c 10
5. Monitor Normal:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/30/F0/wKioL1OppPnSq-yaAABa-f1rcJk759.jpg "title=" normal. jpg "alt=" Wkiol1opppnsq-yaaaba-f1rcjk759.jpg "/>
6. Summary:
Find out some points of attention in the analysis based on the problem:
(1), check whether the client Nrpe permissions are readable, can be executed by Nagios, if Nagios permissions are not enough, you need to raise power.
(2), check the nrpe.cfg inside the commands command path is correct.
(3), in the configuration finished nrpe.cfg, did not kill Nrpe process.
(4), if the above problems have not been resolved, then rewrite the relevant configuration file command;
7. Some common Nrpe error message resolution methods:
A. Check that the configuration file is correct
/usr/local/nagios/bin/nagios-v/usr/local/nagios/etc/nagios.cfg
B.nagios configuration Nrpe The following error occurred:
Check_nrpe:error-could not complete SSL handshake.
Workaround:--> Make sure that the firewalls on both sides allow Port 5666 to pass!
At the controlled end
#vi/etc/xinetd.d/nrpe
Only_from//Add Master IP
#vi/usr/local/nagios/etc/nrpe.cfg
Allowed_hosts//Add Master IP
#service xinetd Restart
On the monitor side:
/usr/local/nagios/libexec/check_nrpe-h Monitored side IP
--Test whether the connection is successful (the version returned Nrpe is correct)
C. Problem: Install Nrpe, the following information is prompted when compiling
Checking for SSL headers ... configure:error:Cannot find SSL headers
The reason is that the Openssl-devel package is missing,
Yum-y Install Openssl-devel
Throw, toss one night, late bye ha!
This article is from the "Little K" blog, make sure to keep this source http://zyp88.blog.51cto.com/1481591/1430536