I have to re-learn this every time I setup a new system so here is the basics for setting up bandwidth graphs with cacti. This assumes a RHEL/Centos/SL 6 installation.
- Create a cacti snmp user in /etc/snmp/snmpd.conf
com2sec cactiUser default your-community-string-goes-here group cactiGroup v1 cactiUser group cactiGroup v2c cactiUser view allview included .1 access cactiGroup "" any noauth exact allview none none
- Start snmpd
service start snmpd chkconfig snpds on
- Install net-snmp-utils
yum install net-snmp-utils
- Install Cacti
yum install cacti
- Create MySQL DB and user (this may be done for you by the cacti RPM I’m not sure)
mysqladmin create cacti mysql < /usr/share/doc/cacti-0.8.8a/cacti.sql mysql mysql mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword'; mysql> flush privileges;
- Configure /etc/cacti/db.php with the password you setup in the DB
- Edit /etc/cron.d/cacti and uncomment the poller.php line by deleting the leading “#” charcter
- Edit /etc/httpd/conf.d/cacti.conf to Allow your IP address to access the web UI
- Browse to http://example.com/cacti/ and do the initial config
- Log in as admin/admin
- Set the admin password
- Browse to “Devices” : http://example.com/cacti/host.php
- “Localhost” : http://example.com/cacti/host.php?action=edit&id=1
- Change “SNMP Version” from “Not In Use” to “Version 2”
- Change “SNMP Community” to the your-community-string-goes-here that you set in snmpd
- Click “Save”
- Under “Associated Data Queries”… “Add Data Query”
- Select “SNMP - Interface Statistics”
- Click “Add”
- Click “Create Graphs for this host” : http://example.com/cacti/graphs_new.php?host_id=1
- Under “Data Query” check the checkbox on the far right next to eth0
- In the “Select a graph type” select “In/Out Bits with 95th percentile”
- Click “Create”
- Wait 5 minutes while cron calls the poller and generates the first data for graph rendering