[HOWTO] Upgrading Cacti to 0.8.6j & Plugin Architecture

If you figure out how to do something interesting/cool in Cacti and want to share it with the community, please post your experience here.

Moderators: Developers, Moderators

Post Reply
24jedi
Posts: 8
Joined: Fri Feb 24, 2006 11:22 pm

[HOWTO] Upgrading Cacti to 0.8.6j & Plugin Architecture

Post by 24jedi »

Also posted at
http://cactiusers.org/forums/viewtopic.php?p=3945#3945

Upgrading Cacti to 0.8.6j, Plugin Architecture, & new plugins.
former distribution was on Centos with CactiEZ ISO install, ver 0.8.6h

These notes were generated after some frustration and, admittedly, some education. I am sharing my notes as part of the whole open-source, the world is a better place, GPL thingy .... As well as my appreciation for the community support.

There is no guarantee for your success, but they seem to work for me.
These notes assumes that Cacti is installed in the web root.
/var/www/html

Not /var/www/html/cacti
My notes take from
http://cactiusers.org/wiki/PluginArchitectureInstall
http://www.cacti.net/download_patches.p ... ion=0.8.6j
===========================================

<b>Do not attempt to access Cacti until all steps are finished.</b>

From http://cactiusers.org/wiki/PluginArchitectureInstall
From here you are done installing the Plugin Architecture, but it is necessary to configure it first before you continue using Cacti (or Cacti will probably not function properly!)

Code: Select all

===========================================
Download all neccessary files to /tmp/
-cacti
-cacti plugin architecture
-cacti plugins {these are shown as examples}
	BackUp
	Discovery
	Flowview
	Haloe
	MacTrack
	Monitor
	NTop
	RRDClean
	Reports
	Thold
	Tools
	Update 

Download each tar.gz file
					% cd /tmp
[cacti]			% wget http://www.cacti.net/downloads/cacti-0.8.6j.tar.gz
[plugin arch]	% wget http://cactiusers.org/downloads/cacti-plugin-arch.tar.gz
[discovery]		% wget http://cactiusers.org/downloads/discovery.tar.gz
	:
	:
	:

Extract each tar.gz file
% tar -zvxf cacti-0.8.6j.tar.gz
% tar -zvxf cacti-plugin-arch.tar.gz
% tar -zvxf discovery.tar.gz
	:
	:
	:
===========================================
-- Cacti files--
Stop Apache
% apachectl stop

Backup old cacti database
% mysqldump --opt > mysql.cacti

Move existing cacti folder /html_old
% cd /var/www/
% mv -R html /tmp/html_old
% mkdir /var/www/html

Copy new cacti folder(files) into html folder
% cp -R /tmp/cacti-version/* /var/www/html/.

Copy the *.rrd files from old Cacti Directory
% cp /tmp/html_old/rra/*  /var/www/html/rra/.

{OPTIONAL}
Copy relevant scripts. Be sure not to overrite newer scripts from upgrade process
% cp - u /tmp/html_old/scripts/*  /var/www/html/scripts/.

{OPTIONAL}
Copy relevant resources. Be sure not to overrite newer resources from upgrade process
% cp - u -R /tmp/html_old/resource/*  /var/www/html/resource/.

{OPTIONAL}
Change permissions on these two folders
% cd /var/www/html/
% chown -R cactiuser rra/ log/

//-- Do Not access Cacti yet.
//-- The plugin architecture needs to be updated first.

===========================================
-- Plugin Architecture ---
Using the Pre-Patched Files
% cd /tmp/cacti-plugin-arch

You will now copy the files from the "files-0.8.6j" directory to your Cacti install directory, overriding any files if you are prompted.

% cp -R files-0.8.6j/*  /var/www/html/.
{Answer yes to overrite existing files}

Now you will need to configure the plugin architecture.

Configuration:
It is necessary to configure your Cacti install after installing the Plugin Architecture for several reasons. First you will need to re-enter your database username and password (you can just pull the info out of your backup of your old includes/config.php). This is fairly straight forward and not necessary to cover here.


/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "CactiMadeEZ";
$database_port = "3306";

$config['url_path'] = "/";

===========================================
-- Plugins ---
Now you will copy the extracted plugins into the working cacti folder /var/www/html/plugins/
For the purpose of keeping myself from getting confused, I initially created a directory called cacti_plugins and downloaded all plugins.tar.gz into this folder, THEN extracted each file.

% cd /tmp/cacti_plugins
% cp -R discovery /var/www/html/plugins/.
% cp -R hostinfo /var/www/html/plugins/.
	:
	:
	:

you should now have similiar folders in /var/www/html/plugins/:
drwxr-xr-x   3 root root 4096 Aug 30 15:30 discovery
drwxr-xr-x   2 root root 4096 Aug 30 15:31 flowview
drwxr-xr-x   6 root root 4096 Aug 30 15:31 haloe
drwxr-xr-x   2 root root 4096 Aug 30 15:31 hostinfo
-rw-r--r--   1 root root   44 Aug 30 15:27 index.php
drwxr-xr-x   8 root root 4096 Aug 30 15:31 mactrack
drwxr-xr-x   4 root root 4096 Aug 30 15:32 monitor
drwxr-xr-x   3 root root 4096 Aug 30 15:32 ntop
drwxr-xr-x   3 root root 4096 Aug 30 15:32 settings
drwxr-xr-x   2 root root 4096 Aug 30 15:34 ssl
drwxr-xr-x   3 root root 4096 Aug 30 15:32 thold
drwxr-xr-x   2 root root 4096 Aug 30 15:32 tools
drwxr-xr-x   2 root root 4096 Aug 30 15:33 update

Now to activate the plugins

You will now need to modify Cacti's configuration file to activate the plugin. This the same file that you had to use to configure Cacti to connect to the correct database. Using the above example, Cacti's config file would be located here
	/var/www/html/include/config.php

% cd /var/www/html/include/
% vi config.php

Add the following below $plugins = array();
comment out what you either don't want or don't have using (//)


//$plugins[] = 'backups';
$plugins[] = 'discovery';
$plugins[] = 'flowview';
$plugins[] = 'haloe';
$plugins[] = 'hostinfo';
$plugins[] = 'mactrack';
$plugins[] = 'monitor';
$plugins[] = 'ntop';
//$plugins[] = 'rrdclean';
$plugins[] = 'settings';
$plugins[] = 'ssl';
$plugins[] = 'thold';
$plugins[] = 'tools';
$plugins[] = 'update';
//$plugins[] = 'weathermap';

===========================================
-- Patches  ---
Download and install patches
http://www.cacti.net/download_patches.php?version=0.8.6j

Execute the following commands to install all of these patches against Cacti version 0.8.6j. Be sure that you are in your Cacti directory when you execute these commands.

wget http://www.cacti.net/downloads/patches/0.8.6j/ping_php_version4_snmpgetnext.patch
wget http://www.cacti.net/downloads/patches/0.8.6j/tree_console_missing_hosts.patch
wget http://www.cacti.net/downloads/patches/0.8.6j/thumbnail_graphs_not_working.patch
wget http://www.cacti.net/downloads/patches/0.8.6j/graph_debug_lockup_fix.patch
wget http://www.cacti.net/downloads/patches/0.8.6j/snmpwalk_fix.patch
patch -p1 -N < ping_php_version4_snmpgetnext.patch
patch -p1 -N < tree_console_missing_hosts.patch
patch -p1 -N < thumbnail_graphs_not_working.patch
patch -p1 -N < graph_debug_lockup_fix.patch
patch -p1 -N < snmpwalk_fix.patch

Start Apache back up
% apachectl start

===========================================
-- Update Cacti application ---

Now Point your web browser to

http://yourserver/

Follow prompts

-- 
I hope this limits the misery for others
Best Regards and Good Luck
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests