Nagios Construction and configuration----(medium)

Source: Internet
Author: User

The previous article has written about the state of the Nagios monitoring machine we've arranged, so let's look at the configuration of the Nagios monitoring server state. As for why this configuration, we can go to Baidu under the next look

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/44/57/wKioL1Pg2mbzXlpgAACiL_AJ_Yc154.jpg "title=" CR76F7X1CR (1W@W177I3NI4.jpg "alt=" Wkiol1pg2mbzxlpgaacil_aj_yc154.jpg "/>

Remote server is monitored using the Nrpe plug-in.

Remote server Configuration

1, compile and install Nagios-plugin, provide the command to check the status of the server. These commands can be/usr/local/nagios/libexec/under the

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/44/57/wKioL1Pg3QTiQWbsAAS_niH5vqM167.jpg "title=" 5 ' V184ibyihblds%95[}hfs.jpg "alt=" Wkiol1pg3qtiqwbsaas_nih5vqm167.jpg "/>

The commands in the red box are some of the basic commands we use in our experiments. View command help, such as Check_http--help

TAR-ZXVF nagios-plugins-2.0.3.tar.gz-c/usr/src///Unpacking
cd/usr/src/nagios-plugins-2.0.3/


2, create the required users and groups,

Useradd Nagios
Groupadd Nagcmd
Usermod-ag Nagcmd Nagios
./configure--with-nagios-user=nagios--with-nagios-group=nagcmd

Make && make install

3, install Nrpe

TAR-ZXVF nrpe-2.12.tar.gz-c/usr/src/
cd/usr/src/nrpe-2.12/
Ls
./configure
Make && make install
Make Install-plugin
Make Install-daemon
Make Install-daemon-config

3, configure the Nrpe configuration file (at this point to/usr/local/nagios/libexec/under the view that you can see the Check_nrpe command

Vim/usr/local/nagios/etc/nrpe.cfg
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/44/56/wKiom1Pg3w7RlbIkAAuK1mSOGgs057.jpg "title=" j% 7q2f77@zpp4c{' F_53@BH.jpg "alt=" Wkiom1pg3w7rlbikaauk1msoggs057.jpg "/>

The name of the command in the note, and so on our server-side configuration needs to use

4, monitored server allows monitoring server to monitor itself

Vim/etc/xinetd.d/nrpe

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/44/57/wKiom1Pg4G6A91xVAALT9WBTWLc417.jpg "title=" Brzl ( BB) _ch%z21]bo~f7e9.jpg "alt=" Wkiom1pg4g6a91xvaalt9wbtwlc417.jpg "/>


5, if you start Nrpe (temporary service, need to restart the XINETD service) service, we can not see the Nrpe process. We'll first define the port 5666 under which it works.

Vim/etc/services

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/44/57/wKiom1Pg4XfDWhfuAAaPZeHIBm4611.jpg "title=" At@3n9mn6g~6krxkyhn%dgd.jpg "alt=" Wkiom1pg4xfdwhfuaaapzehibm4611.jpg "/>

6, by this, we have been configured to monitor the end of the configuration has been completed. You can restart the XINETD service and load the Nrpe service.

Service xinted Restart

This article is from "Linux rookie" blog, please be sure to keep this source http://ludihua.blog.51cto.com/4601284/1536133

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.