Nagios monitoring Internal Error nrpe:unable to read output resolution!

Source: Internet
Author: User
Tags install openssl

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


    1. #/usr/local/nagios/libexec/check_nrpe-h 1192.168.1.10-c Check_mem


    2. 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:


    1. #usermod-S/bin/bash nagios


    2. #su-nagios


    3. [[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.



    1. # 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

    1. #su-nagios

    2. 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:

    1. #vim/usr/local/nagios/etc/nrpe.cfg


    2. command[check_mem]=/usr/bin/sudo /usr/local/nagios//libexec/check_mem-w 20-c 10

    3. If the above command is not possible, change to the following;

    4. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.