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.

  1. 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
    
  2. Start snmpd
     service start snmpd
     chkconfig snpds on
    
  3. Install net-snmp-utils
     yum install net-snmp-utils
    
  4. Install Cacti
     yum install cacti
    
  5. 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;
    
  6. Configure /etc/cacti/db.php with the password you setup in the DB
  7. Edit /etc/cron.d/cacti and uncomment the poller.php line by deleting the leading “#” charcter
  8. Edit /etc/httpd/conf.d/cacti.conf to Allow your IP address to access the web UI
  9. Browse to http://example.com/cacti/ and do the initial config
  10. Log in as admin/admin
  11. Set the admin password
  12. Browse to “Devices” : http://example.com/cacti/host.php
  13. “Localhost” : http://example.com/cacti/host.php?action=edit&id=1
  14. Change “SNMP Version” from “Not In Use” to “Version 2”
  15. Change “SNMP Community” to the your-community-string-goes-here that you set in snmpd
  16. Click “Save”
  17. Under “Associated Data Queries”… “Add Data Query”
  18. Select “SNMP - Interface Statistics”
  19. Click “Add”
  20. 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
  21. In the “Select a graph type” select “In/Out Bits with 95th percentile”
  22. Click “Create”
  23. Wait 5 minutes while cron calls the poller and generates the first data for graph rendering