RHEL7.2 installation nagios4.2.1+cacti0.8.8h

Source: Internet
Author: User

Since company system monitoring (Ipmoniter) and network traffic Monitoring (MRTG) are monitored by different software and completed by several servers, they want to be integrated in the near future and changed to open source free nagios and cacti. The following is the deployment log.

First, install the RHEL7.2

Minimize installation, configure IP, time synchronization, local Yum source, install vim (personal habits), bash-completion (command completion)

# yum Install vim# yum install bash-completion# yum install chrony# systemctl enable chronyd# systemctl start chronyd# vim /etc/chrony.confserver 10.100.2.5 iburst//Add a line of time source # Yum install ntpdate# ntpdate 10.100.2.5

Configuring the CentOS 163 yum Source

# yum install wget# wget http://mirrors.163.com/centos/7.2.1511/os/x86_64/packages/ Yum-3.4.3-132.el7.centos.0.1.noarch.rpm # wget http://mirrors.163.com/centos/7.2.1511/os/x86_64 /packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm # wget http://mirrors.163.com/centos/ 7.2.1511/os/x86_64/packages/yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm # wget http:// mirrors.163.com/.help/centos7-base-163.repo # rpm -qa|grep yum             //Check if Yum is installed on Redhat and what Yum packages are available # rpm -qa|grep yum| xargs rpm -e --nodeps //Delete Redhat's own Yum pack # rpm -ivh  yum-3.4.3-132.el7.centos.0.1.noarch.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm  yum-plugin-fastestmirror-1.1.31-34.el7.noarch.rpm # mv centos7-base-163.repo /etc/ yum.repos.d/# vim /etc/yum.repos.d/centos7-base-163.repo//through ": 1, $s/$releasever/7/gc "and": 1, $s/$basearch/x86_64/gc "Find and replace file contents # yum clean all          //Clear Yum Cache # yum makecache          //rebuild cache to improve search package speed # yum update            //update System (omitted)


Ii. installation of Nagios

1. Download the package and install Nagios

Nagios-4.2.1:

Http://nchc.dl.sourceforge.net/project/nagios/nagios-4.x/nagios-4.2.1/nagios-4.2.1.tar.gz

nagios-plugins-2.1.3:

Https://nagios-plugins.org/download/nagios-plugins-2.1.3.tar.gz

NRPE-3.0.1:

https://codeload.github.com/NagiosEnterprises/nrpe/tar.gz/3.0.1

Official Installation Documentation:NAgios quickstartinstallation Guides

https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/ quickstart.html

# yum Install httpd php gcc glibc glibc-common gd gd-devel# yum install unzip//compile required, otherwise an error will be made. # useradd-m-s/sbin/nologin nagios# usermod-ag nagios apache# tar zxvf nagios-4.2.1.tar.gz # CD nagios-4.2.1/# make all # make install# make install-init# make install-config# make install-commandmode# make install-webconf# Vim/usr/local/nag Ios/etc/objects/contacts.cfgemail [email protected]//Modify Nagios warning message address # htpasswd-c/usr/local/nagios/etc/ Htpasswd.users Nagios//Configure login account and password


2. Install Nagios-plugins plug-in

# tar Zxvfnagios-plugins-2.1.3.tar.gz

# CD NAGIOS-PLUGINS-2.1.3/

#./configure--with-nagios-user=nagios--with-nagios-group=nagios

# make

# make Install


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

# Systemctl Enable httpd

# Systemctl Start httpd

# Systemctl Enable Nagios

# Systemctl Start Nagios

#/etc/init.d/nagios Checkconfig//Check the Nagios configuration file for errors, or check with the following command:

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

# Firewall-cmd--zone=public--add-service=http–permanent

# Firewall-cmd–reload

# systemctl Restart Firewalld


Using the Http://10.100.2.158/nagios login console, enter the configured account password to log in.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/88/13/wKiom1fo3t6jkVoQAAHA1QTH65w052.jpg "title=" Screenshot3160.jpg "alt=" Wkiom1fo3t6jkvoqaaha1qth65w052.jpg "/>

Note: If the Web Administrator is not using the default nagiosadmin, you need to modify the Cgi.cfg

# vim/usr/local/nagios/etc/cgi.cfg

Change all nagiosadmin to a custom user name, or you will not be prompted for permission when viewing services.

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/88/13/wKiom1fo4TqjdDWYAACuiYSp7tE237.jpg "title=" Screenshot3161.jpg "alt=" Wkiom1fo4tqjddwyaacuiysp7te237.jpg "/>

The default HTTP will have an alarm message, Workaround: Create a new blank index.html file in the/var/www/html directory.

# touch/var/www/html/index.html

Restart the Nagios and httpd services and wait a few minutes to return to normal.


3. Install Nrpe plug-in

# tar ZXVF nrpe-3.0.1.tar.gz

# CD NRPE-3.0.1/

# yum Install Openssl-devel

Fix checking for SSL headers ... configure:error:Cannotfind SSL headers error issues

#./configure--with-nrpe-user=nagios--with-nrpe-group=nagios--with-nagios-user=nagios--with-nagios-group=nagios --enable-command-args--enable-ssl

# make all//compile and install Nrpe

# Make Install-plugin

# Make Install-daemon

# make Install-config//NOTE: nrpe3.0 below please use # do Install-daemon-config


Pending edit .....


Third, installation cacti


Iv. integration of Nagios and cacti



RHEL7.2 installation nagios4.2.1+cacti0.8.8h

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.