Configuration and integration of the three monitoring platforms (CactiNagiosGanglia)

Source: Internet
Author: User
Tags rrdtool
Official documents for the three types of software: cacti: License

Official documentation for the three types of software:

Cacti: http://docs.cacti.net/manual:087:1_installation#installation
Nagios: http://www.nagios.org/documentation
Ganglia: http://ganglia.info/

In the field of monitoring platform, the three monitoring software have their own strengths and weaknesses. This document first introduces the installation and configuration methods of the three software, and then integrates the three software, make use of the advantages of each software.

System Environment: rhel6 selinux and iptables disabled

Cacti:

The cacti software periodically collects host information through the net-snmp protocol and stores it in the mysql database. When you want to view the host information, find the corresponding rra file in the database and use the rrdtool for plotting, then, the image is returned to the user. Its advantage is that it can generate intuitive reports.

Therefore, the premise for cacti to run is to install rrdtool, mysql, php, and a web publishing program. This article uses apache.

First install the required software and dependencies:

# Yum install httpd mysql-server mysql-devel php-mysql php-snmp net-snmp-utils net-snmp-libs net-snmp-devel libart_lgpl-devel libpng-devel freetype-devel cairo-devel pango-devel gcc make

Note that the php-snmp package is in the Optional library.

Start mysql and apache after installation

 

 
 
  1. # /etc/init.d/httpd start 
  2. # /etc/init.d/mysqld start 

Configure PHP: you only need to modify the/etc/php. ini file and set the time zone to Shanghai:

Date. timezone = Asia/shanghai

Configure snmp:

The configuration of snmp in cacti official documents is too cumbersome.

 
 
  1. # vi /etc/snmp/snmpd.conf 

Replace some statements in the configuration

 
 
  1. #com2sec notConfigUser  default       public 
  2. com2sec local     localhost           public 
  3. com2sec mynetwork 192.168.0.0/24      public 
  4.  
  5. #group   notConfigGroup v1           notConfigUser 
  6. #group   notConfigGroup v2c           notConfigUser 
  7. group MyRWGroup v1         local 
  8. group MyRWGroup v2c        local 
  9. group MyRWGroup usm        local 
  10. group MyROGroup v1         mynetwork 
  11. group MyROGroup v2c        mynetwork 
  12. group MyROGroup usm        mynetwork 
  13.  
  14.  
  15. #view    systemview    included   .1.3.6.1.2.1.1 
  16. #view    systemview    included   .1.3.6.1.2.1.25.1.1 
  17. view all    included  .1 
  18.  
  19. #access  notConfigGroup ""      any       noauth    exact  systemview none none 
  20. access MyROGroup ""      any       noauth    exact  all    none   none 
  21. access MyRWGroup ""      any       noauth    exact  all    all    none 
  22.  
  23. #syslocation Unknown (edit /etc/snmp/snmpd.conf) 
  24. #syscontact Root <root@localhost> (configure /etc/snmp/snmp.local.conf) 
  25. syslocation Linux (RH3_UP2), Home Linux Router. 
  26. syscontact yejk <mrye1990@gmail.com> 
Start snmpd
 
 
  1. # chkconfig snmpd on 
  2. # service snmpd start 

Install rrdtool

 
 
  1. # yum install  libxml2-devel 
  2. # tar zxf rrdtool-1.4.4.tar.gz 
  3. # cd rrdtool-1.4.4 
  4. # ./configure  
  5. # make 
  6. # make install 
  7. # ln -s  /opt/rrdtool-1.4.4/bin/rrdtool  /usr/local/bin 

Install cacti:

 
 
  1. # tar zxf cacti-0.8.7h.tar.gz 
  2. # mv cacti-0.8.7h /var/www/html/cacti 
  3. # cd /var/www/html/cacti/ 
  4. # useradd cacti 
  5. # chown -R cacti rra log 
  6. # mysql cacti < cacti.sql 

Create a user in the database for cacti, and only have the permission to operate on the cacti database:

 
 
  1. #mysql 
  2. mysql> grant all on cacti.* to cacti@localhost identified by 'cacti'; 
  3. mysql> flush privileges; 
  4. mysql> quit 

Edit the cacti configuration file, www.linuxidc.com, and change the user and password used to log on to the database.

 
 
  1. # vim include/config.php  
  2. $database_type = "mysql"; 
  3. $database_default = "cacti"; 
  4. $database_hostname = "localhost"; 
  5. $database_username = "cacti"; 
  6. $database_password = "cacti"; 
  7. $database_port = "3306"; 
  8. $database_ssl = false; 
  9. $url_path = "/cacti/"; 
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.