CentOS 6.5 Nagios Monitoring installation article

Source: Internet
Author: User
Tags php mysql

First, Nagios server-side installation

1. yum install–y httpd php mysql mysql-devel

2. server-side installation Nagios program

wget Http://sourceforge.net/projects/nagios/files/nagios-3.x/nagios-3.2.1/nagios-3.2.1.tar.gz/download

Http://down1.chinaunix.net/distfiles/nagios-plugins-1.4.14.tar.gz

/ Usr/sbin/useraddnagios

Tar zxvfnagios-3.2.1.tar.gz

cdnagios-3.2.1

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

Make all

Make Install;makeinstall-init;make install-config;make install-commandmode, make install-webconf

Makeinstall// to install the main program, CGI and HTML files

Makeinstall-init// Installing the startup script in/etc/rc.d/init.d

makeinstall-config// to install the sample configuration file, the installation path is/USR/LOCAL/NAGIOS/ETC

Makeinstall-commandmode// To configure directory permissions

makeinstall-webconf// Configure Nagios to integrate with Apache

3 , install Nagios-plugins plug-in, monitor with

Tar zxvfnagios-plugins-1.4.14.tar.gz

cdnagios-plugins-1.4.14

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

make&& make Install

4. server-side installation Nrpe, communicating with clients

Tar-xzf nrpe-2.14.tar.gz

CD nrpe-2.14

./configure--enable-ssl--with-ssl-lib

Make all

Make Install-plugin && make install-daemon&& make Install-daemon-config

Chown-r Nagios.nagios/usr/local/nagios

5 , Nagios access control settings

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

Enter the password two times, the login page will use this password.

6. Restart Nagios, httpd services

Before restarting

/usr/local/nagios/bin/nagios-v/usr/local/nagios/etc/nagios.cfg detection is correct

Restart Nagios,/etc/init.d/nagios restart;/etc/init.d/httpd restart;

7. Nagios Test Access User name: Nagiosadmin

http://localhost/nagios/ such as:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/74/1A/wKiom1YThBXgNqNHAAF-Orbhmxk500.jpg "title=" QQ picture 20151006161811.jpg "alt=" Wkiom1ythbxgnqnhaaf-orbhmxk500.jpg "/>

Click on the left of the hosts to see the right side of the default localhost monitoring, up indicates that the host is currently operating properly:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/18/wKioL1YTgc-BDOVpAAJAI1d0c1c348.jpg "title=" 2.png " alt= "Wkiol1ytgc-bdovpaajai1d0c1c348.jpg"/>

Click Services on the left to see the status of each service on the right side of the default localhost monitor, green OK indicates normal:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/74/1A/wKiom1YTgc6hcdjzAAYgGsu_Ytc065.jpg "title=" 3.png " alt= "Wkiom1ytgc6hcdjzaayggsu_ytc065.jpg"/>

cancel 650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/74/1A/wKiom1YTgeCgccE9AAAViyqjWVI343.jpg "title=" 4.png "alt=" wkiom1ytgecgcce9aaaviyqjwvi343.jpg "/> Big Horn,

Click on the Big Horn icon-Enable Notifications Forthis Service

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/74/18/wKioL1YTgf-z_OzjAAFoXHj4GfI571.jpg "title=" 5.png " alt= "Wkiol1ytgf-z_ozjaafoxhj4gfi571.jpg"/>

Click Commit

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/1A/wKiom1YTgfbx7wIHAABqHCzYMAo446.jpg "title=" 6.png " alt= "Wkiom1ytgfbx7wihaabqhczymao446.jpg"/>

error:could not opencommand file '/usr/local/nagios/var/rw/nagiosnand ' for update! error prompt does not have permission,

authorize this file chmod 777/usr/local/nagios/var/rw/nagiosnand

Error occurred:

http warning:http/1.1 403 Forbidden-5159 bytes in 0.002 second response time ( Warning: http http/1.1 does not have permission to access this site -0. 002-Second response time 5,159 bytes)

Create a new Web page index.html and authorize

chmod o+w/var/www/html/index.html

Two, Nagios Monitoring Client Installation

1. Installing Nagios-plugins

Useradd-s/sbin/nologin Nagios

Tar-xzf nagios-plugins-1.4.14.tar.gz

CD nagios-plugins-1.4.14

./configure--prefix=/usr/local/nagios

&&make &&make Install

2. Client Installation Nrpe

tar-xzfnrpe-2.14.tar.gz && CD nrpe-2.14 &&

./configure--enable-ssl--with-ssl-lib &&

Make all

Makeinstall-plugin && make Install-daemon && makeinstall-daemon-config

Chown-r nagios:nagios/usr/local/nagios/

To start the Nrpe client command:

/usr/local/nagios/bin/nrpe-c/usr/local/nagios/etc/nrpe.cfg-d

3, Client Nrpe settings

Vi/usr/local/nagios/etc/nrpe.cfg

Add the Nagios server-side IP address after the allowed_hosts=127.0.0.1 field

allowed_hosts=127.0.0.1,192.168.1.151 or ALLOWED_HOSTS=127.0.0.1,192.168.1.0/24


This article is from "Linux Rookie growth" blog, please be sure to keep this source http://9040429.blog.51cto.com/9030429/1700386

CentOS 6.5 Nagios Monitoring installation article

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.