cacti thold howto setup

Cacti Tips

I installed cacti and had a need to alert if certain thresholds were crossed. Research pointed  me to the thold plugin, I installed it and couldn't get it to work, I put in a ton of hours trying to figure it out and finally did. In the process I could not find a step by step install howto for boneheads like me so I decided to write one.

Step by Step:

1. Install cacti , make sure its working fine and producing no errors in the http error log.

2. Install the plugin architecture, I downloaded and installed version 2.4.

NOTE: Thold requires the plugin architecture, I downloaded it from  http://cactiusers.org/downloads/. I unzipped it and this is where I made one of my major mistakes, I happily saw that the download included prepatched files, so I simply copied them into place. If I had read the instructions I would have seen I needed to install the pa.sql file included in the download. This pa.sql made database changes required for proper operations. The symptom I experienced from not installing pa.sql file was the "Plugin Management" choice in the "User Management" was missing. This is key because without the ability to manage plugins  I was screwed.

3. Once again make sure no errors are being created in the http error log. I did get errors, turns out that when I installed cacti I didn't install it into the normal http file structure in the html directory. I installed it somewhere else and added a directive into httpd.conf to make a alias. Turns out that php needed to load some include files from the plugin directory and because of the location of the cacti directory it was not able to. There was probably some type of magic directive I could have put into httpd.conf or php.ini but it was easier for me to just move the directory.

Example of my permissions related error looked like this:

[Thu Mar 19 20:07:54 2009] [error] [client 10.195.15.226] PHP Warning: include_once(/var/www/cacti/plugins/thold/setup.php) [<a href='function.include-once'>function.include-once</a>]: failed to open stream: Permission denied in /var/www/cacti/include/plugins.php on line 14, referer: http://monkeymooa/cacti/index.php

4. When satisfied the plugin architecture is working properly  download and install the settings plugin, thold requires this. Follow the instructions and enable the plugin in the global.php configuration file.

5. Download and install thold, I downloaded ( once again from http://cactiusers.org/downloads/ ) and installed version  0.4.1. I installed the thold.sql file and enabled the plugin by added the line to the global.php file.. Once I did these two step the Configure Threshold choices appeared on the user permissions screen and the thold tab appeared next to console graphs


Key Lessons:

  1. Check the http error log for errors
  2. If you install a plugin read the instructions and install any xx.sql file in the package
  3. Comb the cacti users forums for hints.

Cacti resources:

Official site : http://www.cacti.net/

Cacti Users: http://cactiusers.org/