How To Install Plugin Architecture on Ubuntu 9.10 Server ?!

Support for the Plugin Architecture

Moderators: Moderators, Developers

Author
Message
User avatar
banyezdemah
Posts: 44
Joined: Thu May 21, 2009 1:55 am
Location: Iran/Karaj
Contact:

How To Install Plugin Architecture on Ubuntu 9.10 Server ?!

#1 Post by banyezdemah » Fri Mar 12, 2010 12:55 pm

Hi

I have an Ubuntu 9.10 Server (cacti is installed) and I do not know how to install Cacti Plugin Architecture on it.
Does anyone can help me on this?

-----------------------------------------------
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.10
DISTRIB_CODENAME=karmic
DISTRIB_DESCRIPTION="Ubuntu 9.10"
-----------------------------------------------


Thx
Hamed Kazemian
Do Not Hesitate To Contact Me
Cell Phone : +989125019852
Email Address: [email protected]
Full Time – Partnership

[vr]
Posts: 13
Joined: Wed Dec 30, 2009 8:40 am
Location: Saginaw, MI

#2 Post by [vr] » Thu Mar 18, 2010 4:11 pm

If you search you will see a threads discussing PIA being unsupported on the distribution maintainers Cacti. Did you apt-get or synaptic yours or download straight from cacti.net?
Cacti: 0.8.7e (from cacti.net)
Plugin Architecture: 2.5
OS: Debian i386

catcha8
Posts: 16
Joined: Thu May 20, 2010 8:58 am
Location: Switzerland

#3 Post by catcha8 » Thu May 20, 2010 11:45 am

Hello,

You can have a look on this http://cactiusers.org/wiki/PluginArchitectureInstall for sources and documentation

For a fresh install you have to import the pa.sql to your cacti database:
mysql cacti < pa.sql -u root -p
Then restart mysqld

Take care of the configuration part (include/global.php), there is some additional changes needed under Ubuntu, make them correct for your configuration, here is mine:
$config["rra_path"] = $config["base_path"]."/rra";
change it to:
$config["rra_path"] = "/var/lib/cacti/rra";


include($config["library_path"]."/adodb/adodb.inc.php");
change it to:
include("/usr/share/php/adodb/adodb.inc.php");


$config[’url_path’] = ‘/’;
to:
$config[’url_path’] = ‘/cacti/’;
Regards

Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

#4 Post by Voiper99 » Sat Jul 10, 2010 10:36 am

catcha8 wrote:Hello,

You can have a look on this http://cactiusers.org/wiki/PluginArchitectureInstall for sources and documentation

For a fresh install you have to import the pa.sql to your cacti database:
mysql cacti < pa.sql -u root -p
Then restart mysqld

Take care of the configuration part (include/global.php), there is some additional changes needed under Ubuntu, make them correct for your configuration, here is mine:
$config["rra_path"] = $config["base_path"]."/rra";
change it to:
$config["rra_path"] = "/var/lib/cacti/rra";


include($config["library_path"]."/adodb/adodb.inc.php");
change it to:
include("/usr/share/php/adodb/adodb.inc.php");


$config[’url_path’] = ‘/’;
to:
$config[’url_path’] = ‘/cacti/’;
Regards
Thanks a lot for that. I just followed your post and got it working in just a few minutes!

Cheers!

User avatar
TheWitness
Developer
Posts: 14834
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#5 Post by TheWitness » Sun Jul 11, 2010 5:53 am

Please note, that with 0.8.7g and beyond, the plugins array and all customizations that used to be in global.php will be in config.php (or I guess in /etc/cacti/debian.php for Debian based OS').

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

#6 Post by Voiper99 » Sun Jul 11, 2010 5:32 pm

TheWitness wrote:Please note, that with 0.8.7g and beyond, the plugins array and all customizations that used to be in global.php will be in config.php (or I guess in /etc/cacti/debian.php for Debian based OS').

TheWitness
I may be wrong as I am still somewhat of a noob with Cacti, but I believe the debian.php file on Ubuntu is only for the mysql database credentials and the plugins (before 8.7g) were in /usr/share/cacti/site/include/global.php and the config file (which as you have mentioned above is going to be used for the plugins in future) is also in/usr/share/cacti/site/include/config.php - though someone please correct me if I am wrong.

By the way, I know you get this question at least 100 times a day, but any ETA on g's release date? :)

EDIT: I should mention that my above directories are in reference to Ubuntu 10.04, not 9.10 or any other Debian based OS'.

User avatar
TheWitness
Developer
Posts: 14834
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#7 Post by TheWitness » Sun Jul 11, 2010 8:15 pm

0.8.7g is already released. However, the port maintainer for Debian will decide on when he is ready to release for Debian Stable.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

#8 Post by Voiper99 » Sun Jul 11, 2010 8:24 pm

How embarrassing, I just checked http://www.cacti.net/ and saw 8.7g :oops: How long ago was it released, I'm sure I checked it a few days ago and it wasn't there? Or perhaps my eyes were playing tricks on me.

In regards to the port maintainer, (warning: here comes a Linux noob question), isn't it possible just backup my existing Cacti directory, rename it, untar the new 8.7g in to a new cacti directory, then copy across all of my graphs, templates, etc in to the new cacti directory? If this is the case, is there any need to wait for the port maintainer?

Thanks Witness.

User avatar
TheWitness
Developer
Posts: 14834
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#9 Post by TheWitness » Sun Jul 11, 2010 8:30 pm

Yesterday was the release.

The best way to stage an upgrate is as follows:

1) Copy /log and /rra to a separate location, even /scripts /resource too.
2) Link them back to the current production using symbolic links
3) Install your new Cacti somewhere and restablish symbolic links to same files
4) Change your Apache link to point to the new path for the web root.

There are other steps too, like verifying what's new in resource and scripts is not important and making sure that config.php does not have anything new, and of course there is the PIA.

Hopefully you get the jist though.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

Voiper99
Cacti User
Posts: 276
Joined: Thu Mar 01, 2007 5:43 pm
Location: Melbourne, Australia

#10 Post by Voiper99 » Sun Jul 11, 2010 8:44 pm

TheWitness wrote:
There are other steps too, like verifying what's new in resource and scripts is not important and making sure that config.php does not have anything new, and of course there is the PIA.

Hopefully you get the jist though.

TheWitness
Thanks for the information! I'll give it a try and see how I go :) By the way, why does Cacti offer an "upgrade from" option when installing it for the first time if people should go about the upgrade the way in which you have suggested?

Also, what do you mean by "new resources"? By scripts I assume you mean like the interface scripts that allow one to graph traffic that flows over NIC's interface?

I am documenting everything I learn so that I can create a Complete how to for noobies, by a noobie :) I have seen a lot of great info on the forums and other people's websites, but when I was first starting out it was all gibberish to me. I hope that my information will go one step further and explain the very basics to people that have not had any Cacti or Linux exposure.

hugleo
Posts: 10
Joined: Sat Sep 05, 2009 4:33 pm

#11 Post by hugleo » Sat Sep 25, 2010 8:58 am

TheWitness wrote:Please note, that with 0.8.7g and beyond, the plugins array and all customizations that used to be in global.php will be in config.php (or I guess in /etc/cacti/debian.php for Debian based OS').

TheWitness
Please update the documentation http://cactiusers.org/wiki/PluginArchitectureInstall

to reflect that change!

Also update to reflect correct download location:
http://cactiusers.org/downloads/patches/ (don't found PIA)

User avatar
TheWitness
Developer
Posts: 14834
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

#12 Post by TheWitness » Sat Sep 25, 2010 9:25 am

Please PM Cigamit.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

cnrz
Posts: 6
Joined: Tue Mar 29, 2011 4:26 am

Re: How To Install Plugin Architecture on Ubuntu 9.10 Server

#13 Post by cnrz » Wed Mar 30, 2011 1:47 am

Hello,
I didnot see this post before, and posted a new thread for Ubuntu Server 10.10 (http://forums.cacti.net/viewtopic.php?f=20&t=42323 ). But I think more or less the issue is similar to Ubuntu 9.10. Tried several options, but in the end none did help, as I understand the PIA behaves differently under debian based OS. We installed cacti with apt-get cacti command, it works ok, but after installing the plugin we receive a white blank page with http://192.168.1.10/cacti

Currently /etc/cacti/debian.php is as follows:
$database_username='cacti';
$database_password='Cacti';
$basepath='';
$database_default='cacti';
$database_hostname='';
$database_port='';
$dbtype='mysql';

and the /usr/share/cacti/site/include/config.php is as follows:

/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
require('/etc/cacti/debian.php');

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

Which additions may be required in which file? We did not do any additions to the debian.php file

Thanks in advance,

cnrz
Posts: 6
Joined: Tue Mar 29, 2011 4:26 am

Re: How To Install Plugin Architecture on Ubuntu 9.10 Server

#14 Post by cnrz » Wed Mar 30, 2011 2:58 pm

Hi all,

After going through some changes, for both files, the Cacti Plugin Architecture was installed and we may hereafter install plugins easily. The main point is changing some of the global.php, config.php and /etc/cacti/debian.php files. In the documentation debian.php file is not mentioned but it definitely affects the way PIA works. Only this link mentions briefly (http://forums.cacti.net/viewtopic.php?f ... 39#p209839). There may be additional methods but since this is working we think it may be used for Ubuntu Server 10.10.


The Installation consists of:
1. copying the PIA from cactiusers.org by: wget http://mirror.cactiusers.org/downloads/ ... 2.8.tar.gz

2. tar -zxvf cacti-plugin-0.8.7g-PA-v2.8.tar.gz

3. sudo cp cacti-plugin-arch/* /usr/share/cacti/site/ -R

4. Goto the folder cacti-plugin-arch (which you extracted from the download). In this folder is the pa.sql.Import the pa.sql file to the cacti database. If this is not done, graphics are not seen on the cacti web site:
/usr/local/mysql/bin/mysql --user=root --password=rootpw cacti < pa.sql (or mysql cacti < pa.sql -u root -p rootpw). Here you should write the root password given during the installation instead of rootpw.
The Changes made from the original installation files coming within cacti-plugin-0.8.7g-PA-v2.8.tar file is as follows: (Other lines left exactly the same, just copy them to /usr/share/cacti/site

STEP1: Change /usr/share/cacti/site/include/global.php as follows:

/* Line 37 $database_username = "cactiuser"; */

$database_username = "cacti";
/* Line 38 $database_password = "cactiuser"; */

$database_password = "enter your pass given during installation(not cactiuser)";

/Line 105 *$config['url_path'] = $url_path;*/

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

/* Line 112 $config["rra_path"] = $config["base_path"] . '/rra';*/

$config["rra_path"] = "/var/lib/cacti/rra";

/* Line 202 include($config["library_path"] . "/adodb/adodb.inc.php");*/

include("/usr/share/php/adodb/adodb.inc.php");


STEP2: Change /usr/share/cacti/site/include/config.php as follows:
config.php is as follows (we don't do any changes in this file, all the additions are made to the debian.php file, but the patch file requires some changes to be made, we did the database setting
configuration on the /etc/cacti/debian.php file. $url_path = "/"; parameter is also changed on the global.php file.

<?php


/* make sure these values refect your actual database/host/user/password */
$database_type = "mysql";
require('/etc/cacti/debian.php');

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

?>

/* load up old style plugins here */

$plugins = array();

STEP3: Change /etc/cacti/debian.php
/* Lines 14 and 15 */
$database_username='cacti';
$database_password='enter your pass given during the installation';
Add the following lines:
/* load up old style plugins here. You need to enter some old style plugins like syslog, but for new plugins you don't need to enter them here, by default they appear on plugin management link on the left */
$plugins = array();
$plugins[] = ‘ntop’;


Also, as a second alternative method to the above procedure, just use the patch command, but before using this command make sure that apache2 and mysql services are stopped with /etc/init.d/apache2 stop, and /etc/init.d/mysql stop.

1. Copy the cacti-plugin-arch.diff file to /usr/share/cacti/site with sudo cp cacti-plugin-arch.dif /usr/share/cacti/site command

patch -p1 -N --dry-run < cacti-plugin-arch.diff (see this does not give any errors
patch -p1 -N < cacti-plugin-arch.diff

2. Import the pa.sql file to the cacti database. If this is not done,
graphics are not seen on the cacti web site.
/usr/local/mysql/bin/mysql --user=root --password=rootpw cacti < pa.sql

3. After patching don't forget to restart both apache2 and mysql with
/etc/init.d/apache2 start
/etc/init.d/mysql start

mrphantuan
Posts: 2
Joined: Sat Nov 20, 2010 3:31 am

Re:

#15 Post by mrphantuan » Mon May 16, 2011 4:35 am

catcha8 wrote:Hello,

You can have a look on this for sources and documentation

For a fresh install you have to import the pa.sql to your cacti database:
mysql cacti < pa.sql -u root -p
Then restart mysqld

Take care of the configuration part (include/global.php), there is some additional changes needed under Ubuntu, make them correct for your configuration, here is mine:
$config["rra_path"] = $config["base_path"]."/rra";
change it to:
$config["rra_path"] = "/var/lib/cacti/rra";


include($config["library_path"]."/adodb/adodb.inc.php");
change it to:
include("/usr/share/php/adodb/adodb.inc.php");


$config[’url_path’] = ‘/’;
to:
$config[’url_path’] = ‘/cacti/’;
Regards
Thanks a lot for that. I just followed your post and got it working in just a few minutes!

Cheers!

Post Reply