CentOS 6.3_nagios Configuration Notes

Source: Internet
Author: User
Tags command line centos

First, Nagios monitoring host configuration (ip:192.168.7.249)

1, Installation Nrpe service

Decompression

[Root@nagios ~]# TAR-ZXVF nrpe-2.14.tar.gz

[Root@nagios ~]# CD nrpe-2.14

Compile

[[Root@nagios Nrpe-2.14]#./configure

Root@nagios nrpe-2.14]# make all

[Root@nagios nrpe-2.14]# make Install-plugin

Just run this step, because only Check_nrpe plug-ins are required

2, edit the Commands.cfg file to define the use of Nrpe

[Root@nagios ~]# Vim/usr/local/nagios/etc/objects/commands.cfg

Add the following on the last side:

# ' Check_nrpe ' command definition

Define Command{

Command_name Check_nrpe

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

}

Description

Command_name Check_nrpe

Define the command name as Check_nrpe and use this name in Services.cfg.

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

This is the plug-in program that defines the actual operation. This command line is written in exactly the way Check_nrpe this command. Don't know how to use the Check_nrpe–h view

The $arg1$ parameter, followed by-C, is a test command passed to Nrpe Daemon, which has previously said that it must be one of the 5 commands defined in Nrpe.cfg. Use services.cfg in Check_nrpe! Take this argument with you!

3, configure monitoring objects (workstations and their services, etc.)

[Root@nagios ~]# Vim/usr/local/nagios/etc/nagios.cfg

Add under Cfg_file=/usr/local/nagios/etc/objects/localhost.cfg:

Cfg_file=/usr/local/nagios/etc/objects/services.cfg

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.