Difference between revisions of "Cacti"
Line 1: | Line 1: | ||
A web frontend to RRDtool's[http://oss.oetiker.ch/rrdtool/doc/rrdtool.en.html] data storage and graphing functionality. <br> | A web frontend to RRDtool's[http://oss.oetiker.ch/rrdtool/doc/rrdtool.en.html] data storage and graphing functionality. <br> | ||
− | '''Since Okra is no longer there, this | + | '''Since Okra is no longer there, this has been moved to Roentgen''' <br> |
− | Can be accessed at '' | + | Can be accessed at ''http://roentgen.unh.edu/cacti/''. |
== Graphing Servers == | == Graphing Servers == | ||
=== Client Configuration === | === Client Configuration === | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== External Links == | == External Links == | ||
Line 99: | Line 67: | ||
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (15) 0:00:00.15 | SNMPv2-MIB::sysORUpTime.7 = Timeticks: (15) 0:00:00.15 | ||
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (15) 0:00:00.15 | SNMPv2-MIB::sysORUpTime.8 = Timeticks: (15) 0:00:00.15 | ||
+ | |||
+ | |||
+ | = Older problems = | ||
+ | |||
+ | Things to keep in mind. | ||
+ | |||
+ | == Issue with log filling up == | ||
+ | Since cacti polls frequently, if a machine or a machine's data source is unresponsive, the log file will fill up rapidly with a lot of this: | ||
+ | <pre>06/19/2007 03:10:04 PM - CMDPHP: Poller[0] Host[3] DS[303] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:04 PM - CMDPHP: Poller[0] Host[3] DS[303] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[310] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[311] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[321] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[322] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[323] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[324] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[324] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[348] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[322] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[321] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[323] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[348] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:07 PM - CMDPHP: Poller[0] Host[13] DS[195] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:07 PM - CMDPHP: Poller[0] Host[13] DS[196] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:08 PM - CMDPHP: Poller[0] Host[13] DS[349] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:09 PM - CMDPHP: Poller[0] Host[13] DS[350] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:09 PM - CMDPHP: Poller[0] Host[15] DS[362] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:09 PM - CMDPHP: Poller[0] Host[15] DS[363] WARNING: Result from SNMP not valid. Partial Result: | ||
+ | 06/19/2007 03:10:10 PM - SYSTEM STATS: Time:8.3451 Method:cmd.php Processes:1 Threads:N/A Hosts:11 HostsPerProcess:11 DataSources:202 RRDsProcessed:106 | ||
+ | </pre>If there's too much in the log file, the web interface won't load it. "Clear Cacti Log File" under "System Utilities" should take care of this, but it gives an error when I try: | ||
+ | Clear Cacti Log File | ||
+ | Error: Unable to clear log, no write permissions. | ||
+ | It is necessary to log into okra as root and clear the log by running | ||
+ | <pre>sudo -u cacti rm cacti.log | ||
+ | sudo -u cacti touch cacti.log</pre> | ||
+ | To reduce the noise, '''disable''' the non-functioning data sources (''don't'' delete them). | ||
+ | |||
+ | Creating a fresh log file exposes some additional functionality in cacti. The big benefit of this is that now we can see which host numbers corespond to which machines, among other things, just by clicking the links. This is mainly useful for finding out what data sources aren't working, so that they can be disabled. |
Revision as of 14:47, 14 April 2009
A web frontend to RRDtool's[1] data storage and graphing functionality.
Since Okra is no longer there, this has been moved to Roentgen
Can be accessed at http://roentgen.unh.edu/cacti/.
Graphing Servers
Client Configuration
External Links
- New, official documentation site
- Official Manual: Documentation HTML Docs Only useful for general setup and advanced topics -- not much about in-between or debugging
- Documentation of the SensorHawk (which can be coupled with Cacti): User Guides
- Our Cacti: [2]
Setting up Cacti on Roentgen
This is the setup for Cacti on Roentgen (Centos 5 webserver system, a virtual node under Xen on Pumpkin). I looked at Cacti Linux Howto but used yum and packages instead of wget and make.
- Add the database to Mysql
- Database: create database cactidb;
- Users permissions: grant * on cactidb to root, cactiuser and maurik
- Install rrdtool, net-snmp, cacti using "yum".
- Note that the install of cacti automatically creates the "cactiuser" and "cacti" group.
- Create link from /var/www/physics/cacti to /var/www/cacti (so you can get there with http://roentgen.unh.edu/cacti )
- Execute: mysql --user=root --password=rootpw cactidb < cacti.sql
- Check that the poller is running in crontab: */5 * * * * cacti php /var/www/cacti/poller.php &>/dev/null
- Now go with the browser to http://roentgen.unh.edu/cacti
- Follow directions. Set the log file to /var/log/cacti.log
- Create new user, "npgadmin" with the same password as the rhn.redhat.com site. This user is an admin.
- Up and running. Next - create stuff to poll.
Quick one on testing if a system has any snmp capabilities:
Read temp 1 from SensorHawk:
snmpget -v 1 10.0.0.98 -c public .1.3.6.1.4.1.3854.1.2.2.1.16.1.3.0 SNMPv2-SMI::enterprises.3854.1.2.2.1.16.1.3.0 = INTEGER: 22
Read stuff from pumpkin (logged in on pumpkin)
snmpwalk -v 1 localhost -c public .1.3.6.1.2.1.1 SNMPv2-MIB::sysDescr.0 = STRING: Linux pumpkin.unh.edu 2.6.18-92.1.22.el5xen #1 SMP Fri Dec 5 09:58:39 EST 2008 x86_64 SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10 DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (4296) 0:00:42.96 SNMPv2-MIB::sysContact.0 = STRING: NPG Admins <npg-admins@einstein.unh.edu> SNMPv2-MIB::sysName.0 = STRING: pumpkin.unh.edu SNMPv2-MIB::sysLocation.0 = STRING: Durham, NH, USA, University of New Hampshire, DeMeritt Hall SNMPv2-MIB::sysORLastChange.0 = Timeticks: (15) 0:00:00.15 SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB SNMPv2-MIB::sysORID.3 = OID: IP-MIB::ip SNMPv2-MIB::sysORID.4 = OID: UDP-MIB::udpMIB SNMPv2-MIB::sysORID.5 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup SNMPv2-MIB::sysORID.6 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance SNMPv2-MIB::sysORID.7 = OID: SNMP-MPD-MIB::snmpMPDCompliance SNMPv2-MIB::sysORID.8 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for managing TCP implementations SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing IP and ICMP implementations SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing UDP implementations SNMPv2-MIB::sysORDescr.5 = STRING: View-based Access Control Model for SNMP. SNMPv2-MIB::sysORDescr.6 = STRING: The SNMP Management Architecture MIB. SNMPv2-MIB::sysORDescr.7 = STRING: The MIB for Message Processing and Dispatching. SNMPv2-MIB::sysORDescr.8 = STRING: The management information definitions for the SNMP User-based Security Model. SNMPv2-MIB::sysORUpTime.1 = Timeticks: (13) 0:00:00.13 SNMPv2-MIB::sysORUpTime.2 = Timeticks: (13) 0:00:00.13 SNMPv2-MIB::sysORUpTime.3 = Timeticks: (13) 0:00:00.13 SNMPv2-MIB::sysORUpTime.4 = Timeticks: (13) 0:00:00.13 SNMPv2-MIB::sysORUpTime.5 = Timeticks: (13) 0:00:00.13 SNMPv2-MIB::sysORUpTime.6 = Timeticks: (15) 0:00:00.15 SNMPv2-MIB::sysORUpTime.7 = Timeticks: (15) 0:00:00.15 SNMPv2-MIB::sysORUpTime.8 = Timeticks: (15) 0:00:00.15
Older problems
Things to keep in mind.
Issue with log filling up
Since cacti polls frequently, if a machine or a machine's data source is unresponsive, the log file will fill up rapidly with a lot of this:
06/19/2007 03:10:04 PM - CMDPHP: Poller[0] Host[3] DS[303] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:04 PM - CMDPHP: Poller[0] Host[3] DS[303] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[310] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[311] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[321] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[322] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[323] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[324] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[324] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[348] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[322] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[321] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[323] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:05 PM - CMDPHP: Poller[0] Host[6] DS[348] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:07 PM - CMDPHP: Poller[0] Host[13] DS[195] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:07 PM - CMDPHP: Poller[0] Host[13] DS[196] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:08 PM - CMDPHP: Poller[0] Host[13] DS[349] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:09 PM - CMDPHP: Poller[0] Host[13] DS[350] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:09 PM - CMDPHP: Poller[0] Host[15] DS[362] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:09 PM - CMDPHP: Poller[0] Host[15] DS[363] WARNING: Result from SNMP not valid. Partial Result: 06/19/2007 03:10:10 PM - SYSTEM STATS: Time:8.3451 Method:cmd.php Processes:1 Threads:N/A Hosts:11 HostsPerProcess:11 DataSources:202 RRDsProcessed:106
If there's too much in the log file, the web interface won't load it. "Clear Cacti Log File" under "System Utilities" should take care of this, but it gives an error when I try:
Clear Cacti Log File Error: Unable to clear log, no write permissions.
It is necessary to log into okra as root and clear the log by running
sudo -u cacti rm cacti.log sudo -u cacti touch cacti.log
To reduce the noise, disable the non-functioning data sources (don't delete them).
Creating a fresh log file exposes some additional functionality in cacti. The big benefit of this is that now we can see which host numbers corespond to which machines, among other things, just by clicking the links. This is mainly useful for finding out what data sources aren't working, so that they can be disabled.