nagios4.2.4 adding files to be modified by the monitored side

Source: Internet
Author: User

Nagios 4.2.4

Install:

Epel Source

Yum install-y Nagiosyum install-y Nagios-plugins-all

RESOURCE.CFG file record plug-in location under Private directory

Nrpe is required for monitoring and monitoring

Yum Install-y Nrpe

/etc/nagios/nrpe.cfg command needs to be modified


After the installation is complete

First, the monitoring side

1. Modify the configuration file

Vim/etc/nagios/nrpe.cfg Allow hosts = 127.0.0.1/usr/lib64/nagios/plugins///each plug-in storage path



Vim/etc/nagios/objects/command.cfg

Last join, support PNP and Check_nrpe

# ' Check_nrpe '  command definitiondefine command{          command_name check_nrpe         command_line $ user1$/check_nrpe -h  $HOSTADDRESS $ -c  $ARG 1$ } # bulk with npcd  mode  #define  command {        command_name     process-service-perfdata-file        command_line     /bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var /spool/service-perfdata. $TIMET $ } define command {         command_name    process-host-perfdata-file         command_line    /bin/mv /usr/local/pnp4nagios/var/host-perfdata /usr /local/pnp4nagios/var/sPool/host-perfdata. $TIMET $ } 



Vim/etc/nagios/nagios.cfg


Cfg_dir=/etc/nagios/servers//Specifies the storage path of the monitored host configuration file

Create/ETC/NAGIOS/SERVERS/S0.CFG related monitoring items about S0

You can add your own monitored services

Define host{use Linux-server,host-pnp host_name s0 alias S0 address 192.168.1.88}de    Fine service{use GENERIC-SERVICE,SRV-PNP host_name s0 service_description load Load Check_command Check_nrpe!check_load}



Second, the monitored end

Vim/etc/nagios/nrpe.cfg

Allow hosts = 192.168.1.202 (monitor-side server)/usr/lib64/nagios/plugins///execute command to store the path in s0.cfg required commands in this file COMMAND[CHECK_TOMCAT1] =/usr/lib64/nagios/plugins/check_service TOMCAT1 #检查tomcat1服务的状态, need to check_service this monitor plugin

Specific documents see Baidu Cloud Network disk

Nrpe.cfg inside add COMMAND[CHECK_TOMCAT1] do not restart Nrpe monitoring will prompt check_tomcat1, no definition


This article is from the "Share,open source" blog, so be sure to keep this source http://liqilong2010.blog.51cto.com/3029053/1915065

nagios4.2.4 adding files to be modified by the monitored 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: 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.