Cacti in the English meaning is the meaning of cactus, Cacti is a set of PHP,MYSQL,SNMP and rrdtool development of network Traffic Monitoring Graphics analysis tool, using PHP development, it is composed of a number of PHP page software, mainly for the enterprise's large number of network equipment, server host Can monitor the service, can provide the CPU load, memory consumption, running process number, disk space, network card traffic and other data information monitoring, cacti focus on the status monitoring, alarm and service recovery function is poor.
Official site:
Http://www.cacti.net
Download page:
Http://www.cacti.net/downloads/cacti-0.8.8b.tar.gz
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/4D/B4/wKiom1RXnxPRRpLMAAT4JaswXNQ738.jpg "title=" 2014-11-03_211506.png "alt=" Wkiom1rxnxprrplmaat4jaswxnq738.jpg "/>
Start Cacti Installation Deployment
Machine IP Address:192.168.1219.129
Software Download:
[Email protected] ~]# wget http://www.cacti.net/downloads/cacti-0.8.8a.tar.gz
[Email protected] ~]# wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz
[Email protected] ~]# wget http://www.cacti.net/downloads/spine/cacti-spine-0.8.8a.tar.gz
Install lamp Environment:
[[email protected] ~]# yum install-y httpd mysql mysql-server php php-mysql php-json php-pdo
To install the relevant Lib library:
[Email protected] ~]# yum install-y cairo-devel libxml2-devel Pango pango-devel
To install the compiler:
[Email protected] ~]# yum-y install gcc make gcc-c++
Unzip the compiled software:
[Email protected] ~]# tar-xzf rrdtool-1.4.5.tar.gz
[Email protected] ~]# CD rrdtool-1.4.5
[Email protected] rrdtool-1.4.5]# /configure--prefix=/usr/local/rrdtool/
[[email protected] rrdtool-1.4.5]# make && make install
[Email protected] rrdtool-1.4.5]# ln-s/usr/local/rrdtool/bin/*/usr/local/bin/
To install the SNMP service:
[Email protected] rrdtool-1.4.5]# yum-y install NET-SNMP net-snmp-utils
To install the cacti main program:
[Email protected] ~]# tar xzf cacti-0.8.8a.tar.gz && mv Cacti-0.8.8a/var/www/html/cacti
To create a cacti database:
[[email protected] ~]# service mysqld start
[Email protected] ~]# /usr/bin/mysqladmin-u root-h rhel64 password ' 123456 '
[Email protected] ~]# /usr/bin/mysqladmin-u root password ' 123456 '
[Email protected] ~]# mysql-uroot-p
mysql> CREATE database cacti;
Query OK, 1 row Affected (0.00 sec)
Mysql> Grant all on cacti.* to [e- Mail protected] ' localhost ' identified by ' 123456 ';
Query OK, 0 rows Affected (0.00 sec)
Mysql> flush Privileges;
Query OK, 0 rows Affected (0.00 sec)
Mysql>
Import cacti data into the cacti database:
[Ro[email protected] ~]# mysql-ucacti-p123456 cacti</var/www/html/cacti/cacti.sql
[Email protected] ~]# chmod-r 777/var/www/html/cacti/rra
[Email protected] ~]# chmod-r 777/var/www/html/cacti/log
[Email protected] ~]# vi/var/www/html/cacti/include/config.php
<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2012 the Cacti Group |
| |
| This program was free software; You can redistribute it and/or |
| Modify it under the terms of the GNU general public License |
| As published by the Free software Foundation; Either version 2 |
| Of the License, or (at your option) any later version. |
| |
| Distributed in the hope that it'll be useful, |
| but without any WARRANTY; Without even the implied warranty of |
| merchantability or FITNESS for A particular PURPOSE. See the |
| GNU general public License for more details. |
+-------------------------------------------------------------------------+
| Cacti:the Complete rrdtool-based Graphing Solution |
+-------------------------------------------------------------------------+
| This code was designed, written, and maintained by the Cacti Group. See |
| about.php and/or the AUTHORS file for specific developer information. |
+-------------------------------------------------------------------------+
| http://www.cacti.net/|
+-------------------------------------------------------------------------+
*/
/* Make sure these values refect your actual Database/host/user/password * *
$database _type = "MySQL";
$database _default = "cacti";
$database _hostname = "localhost";
$database _username = "cacti";
$database _password = "123456";
$database _port = "3306";
$database _ssl = false;
/*
Edit this to point to the default URL of your Cacti install
Ex:if your cacti install as at Http://serverip/cacti/this
would be set to/cacti/
*/
$url _path = "/cacti/";
/* Default session name-session name must contain alpha characters */
$cacti _session_name = "cacti";
?>
[Email protected] ~]# setenforce 0
[Email protected] ~]# crontab-e
*/5 * * * */usr/bin/php/var/www/html/cacti/poller.php >>/tmp/cacti_rrdtool.log 2>&1
http://192.168.1219.129/cacti/
Always click on next down, the user name and password default is Admin.admin, the first time to login need to change the password.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/53/76/wKiom1RoC_OS2okFAAH3sVv6v2E614.jpg "title=" Qq1jpg.jpg "alt=" Wkiom1roc_os2okfaah3svv6v2e614.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/53/74/wKioL1RoDInCSq8YAADMxZAAmtg434.jpg "title=" Qq2jpg.jpg "alt=" Wkiol1rodincsq8yaadmxzaamtg434.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/53/76/wKiom1RoDDfQKYlFAAGOu2xxR-I955.jpg "title=" Qq3jpg.jpg "alt=" Wkiom1roddfqkylfaagou2xxr-i955.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/53/74/wKioL1RoDPjxtdaBAAC7LAGaJVE970.jpg "title=" Qq3.jpg "alt=" Wkiol1rodpjxtdabaac7lagajve970.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/53/74/wKioL1RoDR6BI7HpAADm5H-QcHo223.jpg "title=" Qq20141116102243.jpg "alt=" Wkiol1rodr6bi7hpaadm5h-qcho223.jpg "/>
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/53/76/wKiom1RoDMzixi0MAAMjWrGAzGM275.jpg "title=" Qq20141116102307.jpg "alt=" Wkiom1rodmzixi0maamjwrgazgm275.jpg "/>
Define which devices to monitor:
Control Panel--build devices--Define devices--create images for devices--add new devices in the image tree
Console-->devices-->add (upper left corner)-->define devices-->create Graphs for this host-->create
On the monitored client, install the net-snmp,41 line where you want to fill in the IP address of the monitoring side.
[Email protected] ~]# yum-y install NET-SNMP
[Email protected] ~]# vim/etc/snmp/snmpd.conf
Notconfiggroup "" Any noauth exact all none none
Com2sec notconfiguser 192.168.1219.129 Public
Included view all. 1 80
[[Email protected] ~]# service SNMPD start
Cond...
This article is from "Jerry" blog, please make sure to keep this source http://alipay.blog.51cto.com/7119970/1577095
Use cacti to monitor traffic status under Linux