Cacti

From Nuclear Physics Group Documentation Pages
Jump to navigationJump to search

A web frontend to RRDtool's[1] data storage and graphing functionality.
Since Okra is no longer there, this is currently not functioning.
Can be accessed at https://okra.unh.edu/cacti/.

Graphing Servers

Client Configuration

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.

External Links

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.