Server monitoring-Nagios Installation

Source: Internet
Author: User

Server monitoring-Nagios Installation

I. Preparations before installation

Nagios server: 192.168.1.10

Nagios client: 192.168.1.11

In this article, Nagios only uses the Nagios email alarm function. If you need to draw a picture, you must install cacti or other plug-ins.

Ii. Install the service

On nagios server:

Install Apache + php

Yum install httpd-devel php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml gcc glibc-common gd-devel openssl- devel

Groupadd nagios

Useradd nagios

Useradd-G nagios

Usermod-G nagios apache

Wget http://sourceforge.net/projects/nagios? Source = directory

Tar zxvf nagios-3.2.0.tar.gz

Cd nagios-3.2.0

./Configure -- prefix =/usr/local/nagios -- with-command-group = nagios

Make all

Make install

Make install-init

Make install-config

Make install-commandmode

Make install-webconf


Htpasswd-c/usr/local/nagios/etc/htpasswd. users nagiosadmin


Service httpd restart

Nagios-plugins: www.nagios.org

Tar zxvf nagios-plugins-1.4.14.tar.gz

Cd nagios-plugins-1.4.14

./Configure -- prefix =/usr/local/nagios -- with-nagios-user = nagios -- with-nagios-group = nagios

Make & make install

Wget http://sourceforge.net/projects/nagios-cn/files/latest/download

Tar-xjf nagios-cn-3.2.3.tar.bz2

Cd nagios-cn-3.2.3

./Configure

Make all

Make install

Http://sourceforge.net/projects/nagios/files/nrpe-2.x/

Tar zxvf nrpe-2.13.tar.gz

Cd nrpe-2.13

./Configure

Make all

Make install-plugin


Vi/usr/local/nagios/etc/objects/commands. cfg add

Define command {

Command_name check_nrpe

Command_line $ USER1 $/check_nrpe-H $ HOSTADDRESS $-c $ ARG1 $

}

Check whether the configuration file is correct

/Usr/local/nagios/bin/nagios-v/usr/local/nagios/etc/nagios. cfg

Operate on the monitored Host:

Useradd-s/sbin/nologin nagios

Tar zxvf nagios-plugins-1.4.14.tar.gz

Cd nagios-plugins-1.4.14

./Configure -- prefix =/usr/local/nagios -- with-nagios-user = nagios -- with-nagios-group = nagios

Make & make install

 


Tar zxvf nrpe-2.13.tar.gz

Cd nrpe-2.13

./Configure

Make all

Make install-plugin

Make install-daemon

Make install-daemon-config

Make install-xinetd


Yum install xinetd

Vim/etc/xinetd. d/nrpe

Append only_from = to the address of the monitoring terminal: 192.168.1.10.

Make sure that/etc/services has the nrpe 5666/tcp # NRPE line. If not, add

Restart the xinetd service and the monitoring end has completed configuration.

/Usr/local/nagios/libexec/check_nrpe-H address of the monitored end

If "NRPE v2.12" is displayed, it indicates that NRPE can communicate with the monitored end normally.

After the installation is complete, start the configuration. See

Network Monitor Nagios Overview

Nagios construction and Configuration

Build a Nagios monitoring platform in the Nginx Environment

Configure the basic Nagios System on RHEL5.3 (using Nagios-3.1.2)

CentOS 5.5 + Nginx + Nagios monitoring and control terminal installation and Configuration Guide

Install Nagios Core for Ubuntu 13.10 Server

Nagios details: click here
Nagios: click here

This article permanently updates the link address:

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.