Cacti uses snmpget to obtain data and uses RRDtool to draw images. In addition, you do not need to understand the complex parameters of RRDtool. It provides powerful data and user management functions, allowing each user to view the tree structure, host, and any graph. It can also be used with LDAP for user verification, you can also add templates by yourself, which are very powerful and complete. User-friendly.
The development of the software Cacti is based on making it easier for RRDTool users to use the software. In addition to the basic Snmp traffic and system information monitoring, cacti can also plug-in Scripts and add Templates to make a variety of monitoring charts.
Configuration component rrdtool
Rrdtool is installed. rrdtool cannot be directly installed through yum. You can add Dag RPM Repository so that yum can find rrdtool.
123 [root @ chenyi ~] # Wget requests # Rpm-Uvh rpmforge-release-0.3.6-1.el5.rf.i386.rpm [root @ chenyi ~] # Yum install rrdtool
Configure snmp net-snmp
1 [root @ chenyi ~] # Yum-y install net-snmp-utils net-snmp-libs
Edit the snmp configuration file
12345678 [root @ chenyi ~] # Vi/etc/snmp/snmpd. change conf to about 41 rows: com2sec notConfigUser defaultpublic to: com2sec notConfigUser192.168.1.220public #192.168.1.220 is the IP address of the cacti server installed. specify that only this IP address can obtain the SNMP information of the Local Machine to improve security. Modify about 62 rows: change access notConfigGroup "" any noauth exact systemview none to "access notConfigGroup" "any noauth exact all none" to about 85 rows: # view all supported ded. change 1 80 to: Remove comments.
Start the snmp service
123 [root @ chenyi ~] # Service snmpd start [root @ chenyi ~] # Chkconfig -- add snmpd [root @ chenyi ~] # Chkconfig snmpd on
Configure the cacti Program
12 [root @ chenyi ~] # Tar zxf cacti-0.8.7h.tar.gz # unpack [root @ chenyi ~] # Music cacti-0.8.7h/var/www/html/cacti # Move to/html and rename
Create a cacti Database
1234567891011121314151617181920212223242526 [root @ chenyi cacti] # mysql-u root-pEnter password: Welcome tothe MySQL monitor. commands endwith; or \ g. your MySQL connection id is11Server version: 5.1.61Source distributionCopyright (c) 2000,2011, Oracle and/orits affiliates. all rights reserved. oracle isaregistered trademark of Oracle Corporation and/oritsaffiliates. other names may be trademarks of their respectiveowners. type 'help; 'or' \ H' forhelp. type '\ C' toclear the current input statement. mysql> create database cacti; Query OK, 1row affected (0.00sec) mysql> grant all on cacti. * tocacti @ 'localhost' identified by 'cacti'; Query OK, 0 rows affected (0.00sec) mysql> flush privileges; Query OK, 0 rows affected (0.01sec) mysql> usecacti; database changedmysql> source/var/www/html/cacti. SQL
Modify configuration file
1Vim/var/www/html/cacti/include/config. php # Set the user name and password
Modify cacti directory permissions (chmod 755/var/www/html/cacti-R should be executed first)
1 [root @ chenyi cacti] # chmod-R 777 rra log
Access the web to install cacti
Enter http: // 192.168.1.220/cacti/install/
Click next and continue
Check the installation of the corresponding components and rrdtool.
Enter a new password after entering the system.
Cacti Detection
Linux controlled host settings
Install net-snmp
1 [root @ chenyi Packages] # yum install net-snmp
Configure snmpd and start the service
123456vi/etc/snmp/snmpd. change the conf variable com2sec notConfigUser defaultpublic to com2sec notConfigUser192.168.1.220 # change the monitoring IP public to access notConfigGroup "" any noauth exact systemview none to access notConfigGroup "any noauth exact all none will # view all protected DED. 1. Comment removed before 80
Start the service after saving
1234 [root @ chenyi Packages] # service snmpd start is starting snmpd: [OK] [root @ chenyi Packages] # netstat-pant | grep snmptcp00127.0.0.1: 1990.0.0.0: * LISTEN1993/snmpd
Return to the web page and select Create graphs for your new devices and then Create New Host.
For windows host detection, it will be written in subsequent compilation tests!
1234 [root @ chenyi Packages] # php/var/www/html/cacti/poller. php # Run the data collection page [root @ chenyi Packages] # crontab-e # Add a scheduled task */5 ***/usr/bin/php/var/www/html/ cacti/poller. php &>/dev/null [root @ chenyi Packages] # service crond start