Linux under Installation configuration cacti monitoring

Source: Internet
Author: User
Tags net snmp rrdtool snmp

Cacti is a set of graphical analysis tools for network traffic monitoring based on PHP,MYSQL,SNMP and RRDtool development.


Environment Construction:

Cacti Service side: 192.168.20.20

Cacti Client: 192.168.20.30


The steps for cacti installation configuration are as follows:

1. First to install the Epel extension source

Yum Install Epel-release

2. (Install lamp environment) install httpd, PHP, MySQL

Yum install-y httpd php php-mysql mysql mysql-server mysql-devel php-gd libjpeg libjpeg-devel libpng libpng-devel

3. Install cacti, NET-SNMP, RRDtool

Yum install-y cacti Net-snmp net-snmp-utils rrdtool

4. Start the service:

/etc/init.d/mysqld start/etc/init.d/httpd start/etc/init.d/snmpd Start

5. Edit the httpd configuration file

Vi/etc/httpd/conf.d/cacti.conf

Change "Deny from all" to "Allow from all"

/ETC/INIT.D/HTTPD restart

6. Import data Create cacti Library

# mysql-uroot-e "CREATE database Cacti"

Create cacti User

# MYSQL-UROOT-E "Grant all on cacti.* to ' cacti ' @ ' 127.0.0.1 ' identified by ' cacti ';"

Import SQL file

# Mysql-uroot Cacti </usr/share/doc/cacti-0.8.8b/cacti.sql

7. Edit the cacti configuration file

vi/usr/share/cacti/include/config.php changes as follows:

$database _type = "MySQL"; $database _default = "cacti"; $database _hostname = "127.0.0.1"; $database _username = "cacti"; $ Database_password = "cacti"; $database _port = "3306"; $database _ssl = false;

8. Web Access cacti and installation

http://192.168.20.20/cacti/

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/55/wKiom1V5PfKwG1ynAANp9SxfoQM080.jpg "style=" float: none; "title=" 1.jpg "alt=" Wkiom1v5pfkwg1ynaanp9sxfoqm080.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/55/wKiom1V5PfbgzEdUAAFfVnfWCl8804.jpg "style=" float: none; "title=" 2.jpg "alt=" Wkiom1v5pfbgzeduaaffvnfwcl8804.jpg "/>

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/51/wKioL1V5P6mjSY7BAAR6AHDP_Xw545.jpg "style=" float: none; "title=" 3.jpg "alt=" Wkiol1v5p6mjsy7baar6ahdp_xw545.jpg "/>

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>

Click "Next" and "Finish" at two.

Enter Admin Admin login, reset the new password;

9. Execute poller.php, generate graphics, join scheduled Tasks

/usr/bin/php/usr/share/cacti/poller.php

Add Cron Task

CRONTAB-E Increase:

*/5 * * * */usr/bin/php/usr/share/cacti/poller.php


The following steps 10-12 need to be done on the client that needs to be monitored:

10. Install SNMP

Yum Install-y Net-snmp

11. Modify Snmpd.conf

# vi/etc/snmp/snmpd.conf

Modify Syslocation and Syscontact, where syslocation can write the ip,syscontact of the monitoring client to write the admin mailbox

Syslocation 192.168.20.30syscontact Root [email protected]

12. Start SNMP

Service SNMPD Start

13. Login to the Cacti management background, click Console, then click Device, in the upper right corner, click "Add"

Description Write monitoring client IP or customize a name

Hostname Write monitoring Client IP

Host Template Select Ucd/net SNMP Host

Version 2 of SNMP version selected

Click Create in the lower right corner

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s3.51cto.com/wyfs02/m00/6e/51/wkiol1v5qggbck9kaagmc37k3ps572.jpg "title=" 4.jpg "alt=" Wkiol1v5qggbck9kaagmc37k3ps572.jpg "/>

After the introduction of SNMP appears, click "Create Graphs for this Host" in the upper right corner

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s3.51cto.com/wyfs02/m00/6e/55/wkiom1v5pvlhht_7aaewtlaxvea837.jpg "title=" 5.jpg "alt=" wKiom1V5PvLhhT_ 7aaewtlaxvea837.jpg "/>

Graph Types: Select Snmp-interface Statistics

Select the network card you want to monitor in the box below, such as select Eth0,eth1, tick the right small square, then click Create in the lower right corner.

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s3.51cto.com/wyfs02/m01/6e/51/wkiol1v5qkucyybfaajziuvialk900.jpg "title=" 6.jpg "alt=" Wkiol1v5qkucyybfaajziuvialk900.jpg "/>

Graph Types: Then choose graph Template Based

In the box below, select the items you want to monitor, such as Unix-load Average

Tick the right small square, then click Create in the lower right corner

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s3.51cto.com/wyfs02/m02/6e/55/wkiom1v5pykwsjdkaafdk6xhc-m199.jpg "title=" 7.jpg "alt=" Wkiom1v5pykwsjdkaafdk6xhc-m199.jpg "/>

14. Point to the left of graph Trees

Select "Default Tree"

Click Add in the upper right corner

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s3.51cto.com/wyfs02/m02/6e/51/wkiol1v5qodgidbkaajfarn4nuo185.jpg "title=" 8.jpg "alt=" Wkiol1v5qodgidbkaajfarn4nuo185.jpg "/>

Tree Item Type Select "Host"

Host Select the machine IP that we just added

Click Create in the lower right corner

650) this.width=650; "src="/e/u261/themes/default/images/spacer.gif "style=" Background:url ("/e/u261/lang/zh-cn/ Images/localimage.png ") no-repeat center;border:1px solid #ddd;" alt= "Spacer.gif"/>650 "this.width=650;" src= "http ://s3.51cto.com/wyfs02/m02/6e/55/wkiom1v5p0_ig6agaajonaicyee979.jpg "title=" 9.jpg "alt=" wKiom1V5P0_ Ig6agaajonaicyee979.jpg "/>

15. Click the Graphs button in the upper-left corner

On the left you can see

The Defaut tree below has added the host we just added, the graphics will not come out so quickly at first, it will be a little while.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/55/wKiom1V5P3SA9E35AAVCmCHpHjA977.jpg "title=" 10.jpg "alt=" Wkiom1v5p3sa9e35aavcmchphja977.jpg "/>


Finished installing Cacti Monitor, do not see the network card information, the workaround:

Editing a monitored client/etc/snmp/snmpd.conf file

View SystemView included. 1.3.6.1.2.1.1

Modified to:

View SystemView included. 1.3.6.1.2.1

Then restart the SNMPD service;

#/ETC/INIT.D/SNMPD Restart


This article is from the "Model Student's Learning blog" blog, please be sure to keep this source http://8802265.blog.51cto.com/8792265/1660905

Linux under Installation configuration cacti monitoring

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.