The Plugin Architecture for Cacti was designed to be both simple in nature and robust enough to allow freedom to do almost anything in Cacti. Cacti itself is designed nicely enough that integrating into it is fairly easy with very little modifications necessary. Eventually Cacti will come with a standard plugin architecture that will allow you to create addons without the need to modify your installation, but until that time comes (we are working on it) you will need to follow the directions below.
In this tutorial i assume you already have cacti mrtg installed on your server.

Example:

Cacti mrtg version : cacti 0.8.7a
Cacti root : /var/www/cacti
We want to install plugin architecture installed in cacti 0.8.7a
First We need downlaod plugin architecture.
Login with root access into your server

$ mkdir /root/tmp
$ cd /root/tmp
$wget http://cactiusers.org/downloads/cacti-plugin-arch.tar.gz
$tar -zxvf cacti-plugin-arch.tar.gz

Download plugin “monitor”

$ wget http://cactiusers.org/downloads/monitor.tar.gz
$ tar -zxvf monitor.tar.gz

Move monitor plugins into cacti plugins directory

$mv /root/tmp/monitor  /var/www/cacti/plugins/

You will see a file like below : Now goto the directory that you extracted the Plugin Architecture to. In this directory you will find several files with names simular to this “cacti-plugin-0.8.7a-PA-v1.4.diff”.
This is a patch file that contains everything you need to install the Plugin Architecture. You will copy the file that corresponds with your Cacti version to the location of your Cacti install using a command prompt (if you weren’t already using one!) ex : /var/www/cacti
Run patch into cacti root location :

$ cp cacti-plugin-0.8.7a-PA-v1.4.diff /var/www/cacti
$ cd /var/www/cacti
$ patch -p1 -N < cacti-plugin-0.8.7a-PA-v1.4.diff

Next, we need to configure and install plugins “monitor” plugins into cacti :

......

/* Default session name - Session name must contain alpha characters */
$cacti_session_name = "Cacti";

$plugins = array();
$plugins[] = 'monitor';
//$plugins[] = 'xxxxx_plugins'; <-- if you have another plugin you can just put here
//$plugins[] = 'xxxxx_plugins'; 

/* Do not edit this line */
$config = array();

/*
This is full URL Path to the Cacti installation
For example, if your cacti was accessible by http://server/cacti/ you would user '/cacti/'
as the url path.  For just http://server/ use '/'
*/

$config['url_path'] = '/';
..........
Save this file and exit.

Post By Editor (2,827 Posts)

Website: →

Connect