You are hereBlogs / sean's blog / Setting up cacti
Setting up cacti
Introduction
Cacti is a great tool for graphing system/network activity, especially for Cisco devices.
The following are a few tips on getting a Cacti server (on Ubuntu 8.10 / Cacti 0.8.7b in this example) up and running quickly.
Installlation
Install cacti and releavnt tools:
apt-get install snmp cacti curl
Browser to http://HOST/cacti, login as admin/admin and change the password
Apply patch for autocomplete problems, see http://forums.cacti.net/about24765-0-asc-15.html
check connectivity: curl -L http://forums.cacti.net/download.php?id=14681
Save current file: ci -l host.php (or copy host.php host.php.$$)
Apply patch: curl -L http://forums.cacti.net/download.php?id=14681|patch -p1 -N
Settings
For Cisco switch devices, use the settings: generic SNMP-enabled host, down detection: ping+snmp.
Then a list of interfaces to graphed are presented automatically.
Change the default snmp community: Console > Settings > SNMP Community, and perhaps set the defeault SNMP version.
For Cisco, add the interface/alias description to graphs, go to Console > graph template > Interface - Traffic (bits/sec, 95th Percentile).
Change the title from |host_description| - Traffic
to: |host_description| (|query_ifDescr|) - Traffic -|query_ifName|-|query_ifIP|
or: |host_description| |query_ifName| - Traffic (|query_ifDescr|) |query_ifAlias|
If monitoing systems with pure ICMP ping, there is a problem with icmps packs only being able to be generated by the root user. Solutions on trusted cacti systems where only admins have login access:
chmod +sx /usr/share/cacti/site/lib/ping.php run poller.php as root and not www-data in cron.
Testing
If a device is not being graphed, browse it with snmp to see what items are available:
snmpwalk -c MYCOMMUNITY -v1 10.0.0.1 system
snmpwalk -c MYCOMMUNITY -v1 10.0.0.1 (for the complete tree)
Useful commands
tail /var/log/cacti/cacti.log ls -altr /var/log/ vi /etc/cacti/debian.php (check passwords) mv /etc/cron.d/cacti /etc/cron.d/.cacti (disable cacti polling)
vi /etc/cron.d/cacti (change the default polling interval from 5min)
- sean's blog
- Login or register to post comments