You are currently browsing the category archive for the ‘Cacti’ category.

Just a quick post to make public a new library I’ve been working on (based on the initial work of Andre LaBranche). The code is distributed under the LGPL and I hope it proves useful to someone. It was written about a year ago when, to put it plainly, my Python skills where not exactly awesome, so at some stage it’ll be getting a rewrite and tidy up. Anyway to get it head on over to:

Google Code


If you followed my instructions to get the Plugin Architecture on Gutsy running you would have ended up running a “Middle Distro Deb” (Yes I made that up…no idea what you’d call it) of Cacti 0.8.7a2. When you do upgrade to Hardy they actually ended up switching to 0.8.7b due to some security fixes and improvments. Not a problem…

When you do the Distro Upgrade it’ll carry on like usual, next time you go to the Cacti web frontend it will do the upgrade process like usual. Now this is where you get a minor error:

[Fail] ALTER TABLE `graph_templates_item` ADD INDEX `task_item_id` ( `task_item_id` )

[Success] ALTER TABLE `data_input_data` ADD INDEX `t_value`(`t_value`)

Have no fear, the error occurs becasue when you did the upgrade from 0.8.6j (Gutsy’s version) to the 0.8.7a2 release it already too place. If you don’t believe me use MySQL’s command line util to view the indexes of that table with:

show index from graph_templates_item;

The Plugin Arch will need to be repatched over the code, which I’ll update ASAP.

(Usual disclaimer applies: Use this on a test system, I don’t claim this to be bulletproof if you’ve made changes etc. 😉 but it should work ! ie. did for me on a fully running system )

Install cacti via aptitude as per usual, loads of guides out there for that; configure it etc. can even add hosts. It doesn’t break anything, so this can be an upgrade on a current running system.

Download Hardy’s cacti deb from

Install that locally, you’ll then need to follow the upgrade process via the browser again. Be careful if you used cactid rather than the php script you’ll need to make sure it’s not looking for spine (the new cactid name) which hasn’t changed as of yet.I simply modified the path in the config to point at the current cactid binary file.

After  all that, check it’s running, it should be ! Then you can grab the Cacti Plugin Architecture from

Best thing to do here is make a quick backup of /usr/share/cacti/site

cd /usr/share/cacti/

sudo cp -a /usr/share/cacti/site /usr/share/cacti/site_BACKUP

Then untar the  plugin-arch tarball to the /usr/share/cacti/ directory and copy the directory within and the patch file into your /usr/share/cacti/site directory and follow the details on the page to patch them, note do not overwrite files as this totally messes up the changes Ubuntu has made to the Cacti package.

There’s a tiny fix needs to be applied though, edit the file /usr/share/cacti/site/includes/global.php and on line 57 (on mine anyway) and modify it to

$config[‘url_path’] = ‘/cacti/’;

The patching proces changes that to $config[‘url_path’] = ‘/’; which means all the graphics disappears etc. which is obviously not good !

That should be it… one thing to note is so far the CLI tools for cacti are not in the Ubuntu package. Dead simple to add these. Just download the 0.8.7a tarball from and extract it somewhere. Inside it is a cli directory, that can be just copied into the /usr/share/cacti/site folder and you can add graphs, hosts etc. via the CLI tools.

Enjoy… 🙂

Baring any omissions by me (This was done from memory)