Distributed monitoring alarm platform Centreon: Centreon dependency Installation
1. Introduction to Centreon dependency Installation
Centreon installation is complex and relies heavily on operating system libraries. The installation methods include source code compilation and installation and yum source installation. The source code compilation and installation are complex, the error rate is also high, so we recommend that you use the yum source method for installation. Centreon installation is mainly divided into the following parts.
1) install the basic system dependent libraries, such as fping, cpp, gcc, gd, libjpeg-devel, and rrdtool.
2) rrdtool installation: Installing rrdtool is mainly used for drawing. Centreon uses rrdtool to draw collected data into a graphical report.
3) nagios and nagios-plugins installation: Because nagios is the bottom-layer monitoring module of Centreon, nagios installation is essential.
4) ndoutils installation: ndoutils is a tool used to connect nagios to the database. It saves nagios data to the database and then reads the data, it receives and sends data between nagios and centerton.
5) nrpe installation: nrpe communicates with remote hosts to collect various private data of remote hosts.
6) Centreon installation: This is the focus of the introduction. The official Centreon website is http://www.centreon.com/. you can download the latest stable version here. The specific installation process will be explained in detail.
The operating system we use here is CentOS5.5 x86_64. Next we will start to install the Centreon + nagios monitoring system.
Ii. Install yum sources that support Centreon
Here we install two yum sources, rpmforge and epel, which can be downloaded from the following addresses to: http://pkgs.repoforge.org/rpmforge-release/
Http://fedoraproject.org/wiki/EPEL/zh-cn
You can select an appropriate version for download based on your system environment. The download here is:
Rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm
Epel-release-5-4.noarch.rpm.
After the download is complete, run the following command to install it:
[Root @ centreon-server ~] # Rpm-ivh rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm
[Root @ centreon-server ~] # Rpm-ivh epel-release-5-4.noarch.rpm
After the installation is complete, the configuration file of the yum source is generated under/etc/yum. repos. d.
Finally, you need to add a yum source with the following content:
[Root @ centreon-server yum. repos. d] # more centreon. repo
[Centreon]
Name = Dag RPM Repository for Red Hat Enterprise Linux
Baseurl = http://apt.sw.be/redhat/el?releasever/en/?basearch/dag
Gpgcheck = 1
Gpgkey = http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
Enabled = 1
Put the centreon. repo file under/etc/yum. repos. d. The yum source contains the required software packages such as nagios, ndoutils, and nrpe.
Iii. Install the basic system dependency Library
(1) install the GD library and Apache
[Root @ centreon-server app] # yum install httpd gd fontconfig-devel libjpeg-devel libpng-devel gd-devel perl-GD
(2) install Mysql library, PHP and extensions
[Root @ centreon-server app] # yum install openssl-devel perl-DBD-MySQL mysql-server mysql-devel php-mysql php-gd php-ldap php-xml php- mbstring
(3) install Perl and extension modules
[Root @ centreon-server app] # yum install perl-Config-IniFiles perl-DBI perl-DBD-MySQL perl-Crypt-DES perl-Digest-SHA1
(4) install SNMP and dependent Libraries
[Root @ centreon-server app] # yum install perl-Digest-HMAC net-snmp-utils perl-Socket6 net-snmp-libs php-snmp
(5) install RRDTool
[Root @ centreon-server app] # yum install rrdtool perl-rrdtool
(6) install other required Libraries
[Root @ centreon-server app] # yum install dmidecode lm_sensors perl-Net-SNMP net-snmp-perl fping cpp gcc-c ++ libstdc ++ glib2-devel
(7) install PEAR
[Root @ centreon-server app] # yum install php-pear
[Root @ centreon-server app] # pear channel-update pear.php.net
4. Install nagios and nagios-plugins
With the above three yum sources, installing nagios and plug-ins is very simple. The operation is as follows:
[Root @ centreon-server app] # yum install nagios-devel
[Root @ centreon-server app] # yum install nagios-plugins
After Nagios 3.5, all the plug-ins provided by Nagios are placed in another rpm package. If Nagios 3.5 is installed, you also need to install the nagios-plugins-all plug-in package and execute the following command:
[Root @ centreon-server app] # yum install nagios-plugins-all
After Nagios is installed, you will find that the plugin installation path is/usr/lib64/nagios/plugins, And the configuration file path is/etc/nagios, the path of the log file is/var/log/nagios, which may be used later in the configuration.
5. Install ndoutils
Ndoutils is an essential part because it is a tool for connecting nagios to the database. With the yum source above, installing ndoutils becomes very simple. The operation is as follows:
[Root @ centreon-server app] # yum install ndoutils
Depending on the ndoutils version, you may also need to install ndoutils-mysql and execute the following command:
[Root @ centreon-server app] # yum install ndoutils-mysql
After ndoutils installation is complete, it is found that the Ndomod module installation path is/usr/libexec/ndomod-3x.o, or/usr/lib64/nagios/brokers/ndomod. so, and the corresponding maintenance script path is/etc/init. d/ndoutils or/etc/init. d/ndo2db. In this article, the Ndomod module installation path is/usr/libexec/ndomod-3x.o, and the corresponding maintenance script is/etc/init. d/ndoutils. These paths are used during Centreon installation.
6. Install nrpe
To obtain the private information of the remote host, you need to install the check_nrpe plug-in on the monitored host and install the nrpe service on the monitored host. The method for installing nrpe is very simple. You can also install it using yum.
Install the check_nrpe plug-in on the monitoring host:
[Root @ centreon-server app] # yum install check_nrpe
After the check_nrpe is installed, the check_nrpe plug-in is installed in the/usr/lib64/nagios/plugins directory.
Install the nrpe service on the monitored machine:
[Root @ node1 app] # yum install nrpe
After nrpe is installed, the default configuration file path is/etc/nagios/nrpe. cfg, and the script path for maintaining nrpe is/etc/init. d/nrpe.