User Tools

Site Tools




Cacti is hosted on Silverhold and can be found at

You can view the graphs as a guest, by logging in with the following credentials:

  • Username: guest
  • Password: view
  • Realm: Local



Install cacti using portage:

Portage only makes the webapp available on the system; in order to install it into a particular webroot, use <tt>webapp-config</tt>. <source lang="bash"> webapp-config -I -V -h cacti 0.8.7d </source>

  • Create a <tt>cacti</tt> user on <tt></tt>, and grant privileges on all cacti_ databases (use [ phpMyAdmin to do this).
  • Create a <tt>cacti_db</tt> database
  • Install the database schema by running the following command on the web host:

<source lang="bash"> mysql -u cacti -p cactipass -h cacti_db < /var/www/ </source> *Edit the database configuration file with the correct settings (<tt>/var/www/</tt>)

Install a cronjob to update the data queries /etc/cron.d/cacti|<syntax lang="cron"> */5 * * * * apache /usr/bin/php /var/www/ > /dev/null 2>&1 </syntax>

Restart <tt>vixie-cron</tt> to pick up the new cronjob: <source lang="bash"> /etc/init.d/vixie-cron restart </source>

Create an Apache vhost to serve cacti: /etc/apache2/vhosts.d/|<syntax lang="apache"> <VirtualHost *:80> ServerName "" DocumentRoot "/var/www/" <Directory "/var/www/"> Options FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> - vim: set filetype=apache: </syntax>

Open the web interface in a browser, and follow the initial setup. The initial credentials are advertised by webapp-config.




Silverhold doesn't have a publicly accessible IP, so cacti needs to be proxied through a machine that does.

Enable <tt>mod_proxy</tt> on a suitable machine by adding <tt>APACHE_OPTS=“-D PROXY”</tt> to <tt>/etc/conf.d/apache2</tt>.

Then create the following vhost: /etc/apache2/vhosts/|<syntax lang="apache"> <VirtualHost *:80> ServerName ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / ProxyPassReverse / </VirtualHost> - vim: set ts=4 expandtab filetype=apache: </syntax>

Arrange for DNS to resolve internally to the cacti host, and externally to the proxy host.

Finally, restart apache to pick up the new vhost. <source lang="bash"> /etc/init.d/apache restart </source> You must restart rather than reload apache, else it will not pick up the PROXY define and will die



Install the following package on all Gentoo machines to monitor:


Create an SNMPv3 user that cacti can use to access the statistics: <source lang="bash"> net-snmp-config --create-snmpv3-user -X password -a "passphrase" cacti </source>

Create a very minimal SNMP configuration file: /etc/snmp/snmpd.conf|<syntax lang="conf"> rouser cacti </syntax>

Start snmpd, and ensure it autostarts on boot: <source lang="bash"> /etc/init.d/snmpd start rc-update add snmpd default </source>

cacti.txt · Last modified: 2014/11/24 01:14 by