Monitoring and secure operations 1.5 nagios monitoring client-1

Source: Internet
Author: User

3. Nagios Installation-Client (192.168.0.12)
On the client machine

RPM-IVH  http://www.aminglinux.com/bbs/data/attachment/forum/month_1211/epel-release-6-7.noarch.rpm
Yum install-y nagios-plugins nagios-plugins-all Nrpe Nagios-plugins-nrpe

Modifying a configuration file

Vim/etc/nagios/nrpe.cfg
"Allowed_hosts=127.0. 0.1"changed to" allowed_hosts=127.0. 0.1,192.168. 1. 117"The rear IP is the server IP; Find "Dont_blame_nrpe=0" instead of "  dont_blame_nrpe=1

Start the client

/etc/init.d/nrpe start

4. Monitoring Center (192.168.1.117) add monitored host (192.168.1.111)

On the service side

cd/etc/nagios/conf.d/
192.168. 1.111. cfg  

Define Host{
Use Linux-server; Name of the host template to use
; This host definition would inherit all variables that is defined
; In (or inherited by) the Linux-server host template definition.
HOST_NAME 192.168.1.111
Alias 1.111
Address 192.168.1.111
}

Define Service{
Use Generic-service
HOST_NAME 192.168.1.111
Service_description check_ping
Check_command check_ping!100.0,20%!200.0,50%
Max_check_attempts 5
Normal_check_interval 1
}

Define Service{
Use Generic-service
HOST_NAME 192.168.1.111
Service_description Check_ssh
Check_command Check_ssh
Max_check_attempts 5
Normal_check_interval 1
}

Define Service{
Use Generic-service
HOST_NAME 192.168.1.111
Service_description check_http
Check_command check_http
Max_check_attempts 5
Normal_check_interval 1
}

5. Simple description of the configuration file
We have a total of three service:ssh, Ping, HTTP in our defined configuration file

These three projects use the local Nagios tool to connect to the remote machine, meaning that even if the client does not have Nagios-plugins installed and Nrpe can be monitored. Other services such as load, disk usage, etc. require the server to connect to the remote host via Nrpe, so the remote host needs to install the Nrpe service and the corresponding execution script (nagios-plugins)
Max_check_attempts 5 #当nagios检测到问题时, a total of 5 attempts to detect a problem before the alarm, if the value is 1, then detected a problem immediately alarm
Normal_check_interval # Re-detection interval, unit is minutes, default is 3 minutes
Notification_interval #在服务出现异常后, the failure has not been resolved, Nagios again to notify the user of the time. Units are minutes. If you think that all events require only one notification, you can set the option here to 0.


Detection configuration file

Nagios-v/etc/nagios/nagios.cfg

Restart

Service httpd Restart; Service Nagios Restart
/etc/init.d/nrpe start

Http://www.apelearn.com/bbs/thread-7155-1-1.html

Monitoring and secure operations 1.5 nagios monitoring client-1

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.