Server Monitoring-nagios Installation Chapter

Source: Internet
Author: User

One: Prepare before installation

Nagios server:192.168.1.10

Nagios client:192.168.1.11

This post installs Nagios only using the Nagios mail alarm feature, if you need to paint another installation of cacti, or other plugins


Second: Installation Services

To operate on the Nagios server:

Installing apache+php

Yum install httpd httpd-devel php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml gcc glibc glibc-co Mmon GD Gd-devel OpenSSL openssl-devel


Groupadd Nagios

Useradd Nagios

Useradd-g Nagios 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 added at the end

Define Command {

Command_name Check_nrpe

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

}


Check that the configuration file is correct

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


Operating 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

Add Only_from = back to the address of the monitor side :192.168.1.10

Make sure that/etc/services has a Nrpe 5666/tcp #NRPE这一行 and no add

Restart the XINETD service, configured at this point by the monitoring end

/usr/local/nagios/libexec/check_nrpe-h the address of the monitored side

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


The installation is complete, and the configuration starts next.


This article from "People want to have a dream, in case the realization of" blog, please be sure to keep this source http://yangke.blog.51cto.com/9530509/1568512

Server Monitoring-nagios Installation Chapter

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.