Installation and configuration of the Nagios Nrpe client

Source: Internet
Author: User

1.Nrpeinstallation

Create Nagios User

Useradd Nagios


1.1installed by the monitored serverNagiosPlugins

Tar xzvfnagios-plugins-1.4.15.tar.gz

CD nagios-plugins-1.4.15

./configure

Make

Make install


1.2installed by the monitored serverNrpeprogram

Tar xzvf nrpe-2.1.2.tar.gz

CD nrpe-2.1.2

./configure--prefix=/usr/local/nagios

Make all

Make Install-plugin

Make Install-daemon

Make Install-daemon-config

Check for plug-in installation

ll/usr/local/nagios/libexec/


1.3ModifyNrpeconfiguration file, adding the allowedIp

#vi/usr/local/nagios/etc/nrpe.cfg

allowed_hosts=127.0.0.1, 192.169.0.201

Start Nrpe

#/usr/local/nagios/bin/nrpe-c/usr/local/nagios/etc/nrpe.cfg–d

# netstat-plnt |grep Nrpe

TCP 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 16831/nrpe


1.4join Power-on self-boot

Echo '/usr/local/nagios/bin/nrpe-c/usr/local/nagios/etc/nrpe.cfg-d ' >>/etc/rc.local


1.5in the mainNagiosUpper TestCertificate ClientNrpeis it installed?

[Email protected] src]#/usr/local/nagios/libexec/check_nrpe-h 192.168.1.100

NRPE v2.12

If the version number appears, the installation on behalf of the Nrpe client succeeds.


2MasterNagioscalledNrpeConfiguration2.1editing on the clientNrpeconfiguration file

#vi/usr/local/nagios/etc/nrpe.cfg

Command[check_users]=/usr/local/nagios/libexec/check_users-w 5-c 10

Command[check_load]=/usr/local/nagios/libexec/check_load-w 15,10,5-c 30,25,20


2.2in the mainNagiosdefine the client host on

#vi/usr/local/nagios/etc/objects/hosts.cfg

Define Host{

Use Linux-server,host-pnp

HOST_NAME HostB

Alias HostB

Address 192.168.1.100

}


2.3in the mainNagiosConfigure services on

#vi/usr/local/nagios/etc/objects/services.cfg

Define Service{

Use Generic-service,srv-pnp

HOST_NAME HostB

Service_description check_users

Check_command check_nrpe!check_users

Max_check_attempts 5

Normal_check_interval 1

}

Define Service{

Use Generic-service,srv-pnp

HOST_NAME HostB

Service_description Check_load

Check_command Check_nrpe!check_load

Max_check_attempts 5

Normal_check_interval 1

}


2.4Restart MasterNagiosService

#/etc/init.d/nagios Checkconfig

#/etc/init.d/nagios restart


2.5 NagiosThe sector faces control

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/26/8F/wKioL1NrZOPBCgaaAABkYNrkfiQ950.jpg "title=" T9ry_ Ve[s[s ']2}l (x8l2_f.jpg "alt=" Wkiol1nrzopbcgaaaabkynrkfiq950.jpg "/>


This article from "This peace of mind is my Hometown" blog, reproduced please contact the author!

Related Article

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.