Nrpe installation of Nagios monitoring (monitor host side)

Source: Internet
Author: User

Nrpe is based on the correct installation of Nagios-plugins, nagios-plugins installation details, please go to:

[Nagios monitoring Nagios-plugins installation]

1. Dependency packet Detection

#rpm-Q xinetd openssl-devel

#yum Install xinetd Openssl-devel

2. Compiling the installation

Nrpe relies on nagios-plugins, so it needs to be installed first.

# TAR-ZXVF Nrpe-2.12.tar.gz

# CD Nrpe-2.12.tar.gz

#./configure \

--prefix=/usr/local/nagios \

--with-nrpe-user=nagios \

--with-nrpe-group=nagios \

--with-nagios-user=nagios \

--with-nagios-group=nagios \

--enable-command-args \


# make All

# Make Install-plugin

(The monitor side only installs this one plug-in Can)

3. Configuring monitoring

3.1 Defining Nrpe monitoring commands


Add the following on the last side:

# ' Check_nrpe ' command definition

Define Command{

# define command name Check_nrpe, use this name in Services.cfg

Command_name Check_nrpe


Command_line $USER 1$/check_nrpe-h $HOSTADDRESS $-C $ARG 1$


Note: This command line is written in exactly the same way as the Check_nrpe command, and you do not know how to use check_nrpe–h to see it.

3.2 Defining monitored host information


Define Host{

#引用主机linux-server Property Information, the Linux-server host is defined in the Templates.cfg file.

Use Linux-server

HOST_NAME nagios-linux #主机名

Alias Nagios-linux #主机别名

#被监控的主机地址, the address can be either IP or a domain name.




Define Hostgroup{

Hostgroup_name bsmart-servers #主机组名称, can be arbitrarily specified

Alias Bsmart servers #主机组别名

#主机组成员, where "Nagios-linux" is the host defined above

Members Nagios-linux


3.3 Defined on the monitored host to monitor service information


Such as: Monitoring the Load

Define Service{

#引用主机local-service Property Information, Local-service is defined in the Templates.cfg file.

Use Local-service

HOST_NAME nagios-linux #在hosts. COF defined in the host

Service_description Current Load

defined in #check_load要在被监控主机的nrpe. CFG, this command is available by default

Check_command Check_nrpe!check_load


Such as: monitoring disk (note to monitor the type and device number of the disk)

Define Service{

Use Local-service

HOST_NAME Nagios-linux

Service_description Check Disk sda1

Check_command Check_nrpe!check_sda3


Acknowledgement: I refer to a number of articles after summing up, in this thank you network share!

This article is from the "4699096" blog, please be sure to keep this source

Nrpe installation of Nagios monitoring (monitor host side)

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