Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Nov 24, 2017 12:42 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: How To Install Plugin Architecture on Ubuntu 9.10 Server ?!
PostPosted: Fri Mar 12, 2010 12:55 pm 
Offline
User avatar

Joined: Thu May 21, 2009 1:55 am
Posts: 44
Location: Iran/Karaj
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 18, 2010 4:11 pm 
Offline

Joined: Wed Dec 30, 2009 8:40 am
Posts: 13
Location: Saginaw, MI
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 20, 2010 11:45 am 
Offline

Joined: Thu May 20, 2010 8:58 am
Posts: 16
Location: Switzerland
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:

Quote:
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:
Quote:
$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


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 10, 2010 10:36 am 
Offline
Cacti User

Joined: Thu Mar 01, 2007 5:43 pm
Posts: 276
Location: Melbourne, Australia
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:

Quote:
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:
Quote:
$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!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 11, 2010 5:53 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
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
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 11, 2010 5:32 pm 
Offline
Cacti User

Joined: Thu Mar 01, 2007 5:43 pm
Posts: 276
Location: Melbourne, Australia
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'.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 11, 2010 8:15 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
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
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 11, 2010 8:24 pm 
Offline
Cacti User

Joined: Thu Mar 01, 2007 5:43 pm
Posts: 276
Location: Melbourne, Australia
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 11, 2010 8:30 pm 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
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
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 11, 2010 8:44 pm 
Offline
Cacti User

Joined: Thu Mar 01, 2007 5:43 pm
Posts: 276
Location: Melbourne, Australia
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 25, 2010 8:58 am 
Offline

Joined: Sat Sep 05, 2009 4:33 pm
Posts: 10
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)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 25, 2010 9:25 am 
Offline
Developer
User avatar

Joined: Tue May 14, 2002 5:08 pm
Posts: 14863
Location: MI, USA
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
Gandalfs Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: How To Install Plugin Architecture on Ubuntu 9.10 Server
PostPosted: Wed Mar 30, 2011 1:47 am 
Offline

Joined: Tue Mar 29, 2011 4:26 am
Posts: 6
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,


Top
 Profile  
 
 Post subject: Re: How To Install Plugin Architecture on Ubuntu 9.10 Server
PostPosted: Wed Mar 30, 2011 2:58 pm 
Offline

Joined: Tue Mar 29, 2011 4:26 am
Posts: 6
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=20&t=36499&p=209839#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/plugins/cacti-plugin-0.8.7g-PA-v2.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


Top
 Profile  
 
 Post subject: Re:
PostPosted: Mon May 16, 2011 4:35 am 
Offline

Joined: Sat Nov 20, 2010 3:31 am
Posts: 2
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:

Quote:
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:
Quote:
$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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group