Plugin Architecture Version 2.9 Released

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Plugin Architecture Version 2.9 Released

Post by rony »

The Cacti Group is proud to announce the release of version 2.9 of the Plugin Architecture!

Version 2.9 is designed to work with Cacti 0.8.7g.

Download: http://www.cacti.net/downloads/pia/cact ... 2.9.tar.gz
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Re: Plugin Architecture Version 2.9 Released

Post by phalek »

I'm curious: Is there a reason why the files-0.8.7g directory within the archive contains a complete cacti 0.8.7g install ?
Greetings,
Phalek
---
Need more help ? Read the Cacti documentation or my new Cacti 1.x Book
Need on-site support ? Look here Cacti Workshop
Need professional Cacti support ? Look here CereusService
---
Plugins : CereusReporting
super-hornet
Cacti User
Posts: 175
Joined: Sun May 27, 2007 5:42 pm

Re: Plugin Architecture Version 2.9 Released

Post by super-hornet »

Hi rony

I tried cacti 0.8.7g (fresh after extracted from tar.gz) and apply this Plugin Architecture 2.9 but I got error. Should I use the cacti that comes with the cacti plugin and overwrite the 0.8.7g instead?

patch -p1 -N < cacti-plugin-0.8.7g-PA-v2.9.diff
patching file auth_changepassword.php
patching file auth_login.php
patching file cli/add_graph_template.php
patching file cli/add_tree.php
patching file cli/host_update_template.php
patching file data_sources.php
Hunk #6 FAILED at 1323.
1 out of 6 hunks FAILED -- saving rejects to file data_sources.php.rej
patching file graph_image.php
patching file graph.php
patching file graphs_new.php
patching file graphs.php
patching file host.php
patching file images/disable_icon.png
patching file images/enable_icon_disabled.png
patching file images/enable_icon.png
patching file images/install_icon_disabled.png
patching file images/install_icon.png
patching file images/uninstall_icon.gif
patching file images/view_none.gif
patching file include/auth.php
patching file include/bottom_footer.php
patching file include/config.php
patching file include/global_arrays.php
patching file include/global_constants.php
patching file include/global_form.php
patching file include/global.php
patching file include/global_settings.php
patching file include/plugins.php
patching file include/top_graph_header.php
patching file include/top_header.php
patching file index.php
patching file lib/api_automation_tools.php
patching file lib/api_device.php
patching file lib/api_graph.php
patching file lib/api_tree.php
patching file lib/auth.php
patching file lib/data_query.php
patching file lib/functions.php
patching file lib/html_form.php
patching file lib/html.php
patching file lib/html_tree.php
patching file lib/plugins.php
patching file lib/poller.php
patching file lib/rrd.php
patching file lib/template.php
patching file lib/variables.php
patching file plugins/index.php
patching file plugins.php
patching file poller.php
Hunk #1 succeeded at 108 with fuzz 2.
Hunk #2 succeeded at 306 (offset 1 line).
Hunk #3 FAILED at 432.
Hunk #4 FAILED at 451.
Hunk #5 succeeded at 501 (offset 2 lines).
2 out of 5 hunks FAILED -- saving rejects to file poller.php.rej
patching file user_admin.php
patching file utilities.php
shoelessfarmer
Posts: 11
Joined: Sun Mar 21, 2010 6:35 pm

Re: Plugin Architecture Version 2.9 Released

Post by shoelessfarmer »

Using the pre-patched files appears to change the path. My original (and correct) absolute path was /var/www/cacti/. However after using the pre-patched files in Plugin Architecture Ver 2.9, I am seeing a whole bunch of errors in the httpd error_log looking for /var/www/html/cacti/.

For instance, images is at /var/www/cacti/images/, however the prepatched files look to /var/www/html/cacti/images.

I can't seem to find where this path is being set...I need to change it back to the /var/www/cacti/ path. Any help would be appreciated.

BTW, I am running CentOS 5.5. I originally installed the following packages via Yum:
cacti-0.8.7g-2.el5.rf
cacti-spine-0.8.7a-1.el5.rf

Thanks!
cigamit
Developer
Posts: 3363
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Plugin Architecture Version 2.9 Released

Post by cigamit »

The problem is that the Plugin Architecture was made to work with Cacti installed directly from source. If you use RPMs, you run into a whole mess of problems, as every RPM/Deb/etc.. package changes things to however the maintainer of said package desires. And that is not something that a patch can take into account.
shoelessfarmer
Posts: 11
Joined: Sun Mar 21, 2010 6:35 pm

Re: Plugin Architecture Version 2.9 Released

Post by shoelessfarmer »

Understood, but I didn't have this problem with Plugin Architecture 2.8...infact, the documentation specifically tells you to use the pre-patched files if you are using RPM... So, I guess I am trying to figure out why the absolute path is being changed in 2.9...
cigamit
Developer
Posts: 3363
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Plugin Architecture Version 2.9 Released

Post by cigamit »

You might check your global.php to see if anything was changed in there by the RPM Packager (or post it here). Nothing major has changed in the internals between those 2 versions, most of it has been in the Management Interface itself.
shoelessfarmer
Posts: 11
Joined: Sun Mar 21, 2010 6:35 pm

Re: Plugin Architecture Version 2.9 Released

Post by shoelessfarmer »

I can post the whole global.php if you would like, but I ran a diff of the 2 files (the first file is the Plugin Arch 2.9 version and the second file is the rpm 0.8.7g):


96,102d95
< /* set URL path */
< if (! isset($url_path)) {
< $url_path = "";
< }
< $config['url_path'] = $url_path;
< define('URL_PATH', $url_path);
<
197a191,194
> include_once($config["library_path"] . "/functions.php");
> include_once($config["include_path"] . "/global_constants.php");
> include_once($config["include_path"] . "/global_arrays.php");
> include_once($config["include_path"] . "/global_settings.php");
203,208d199
< include_once($config["library_path"] . "/functions.php");
< include_once($config["include_path"] . "/global_constants.php");
< include_once($config["library_path"] . "/plugins.php");
< include_once($config["include_path"] . "/plugins.php");
< include_once($config["include_path"] . "/global_arrays.php");
< include_once($config["include_path"] . "/global_settings.php");
217,218d207
< api_plugin_hook("config_insert");
<

Again, thanks for the replys...any help is appreciated!
cigamit
Developer
Posts: 3363
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Plugin Architecture Version 2.9 Released

Post by cigamit »

Just to cover all bases before I start downloading RPMS and testing, in your include/config.php, please post what your $config['url_path'] is set as.
shoelessfarmer
Posts: 11
Joined: Sun Mar 21, 2010 6:35 pm

Re: Plugin Architecture Version 2.9 Released

Post by shoelessfarmer »

Here is the section from config.php from Plugin Architecture Version 2.9

/*
Edit this to point to the default URL of your Cacti install
ex: if your cacti install as at http://serverip/cacti/ this
would be set to /cacti/
*/
$url_path = "/";

Interestingly enough, there is nothing like that in the RPM version of config.php

I do suspect the issue is somewhere in the "include" directory because I copied each of the directories one at a time and things were generally working fine until the "include" directory was copied...then I started seeing all the path errors in the error_log.
shoelessfarmer
Posts: 11
Joined: Sun Mar 21, 2010 6:35 pm

Re: Plugin Architecture Version 2.9 Released

Post by shoelessfarmer »

As a follow up, if I change include/config.php from:

$url_path = "/";

to:
$url_path = "/cacti/";

the path problem disappears. So, would it make sense to change the distributed files to have this path? Just a thought...

Thanks again for helping me discover this solution!
cigamit
Developer
Posts: 3363
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Plugin Architecture Version 2.9 Released

Post by cigamit »

shoelessfarmer wrote:As a follow up, if I change include/config.php from:

$url_path = "/";

to:
$url_path = "/cacti/";

the path problem disappears. So, would it make sense to change the distributed files to have this path? Just a thought...

Thanks again for helping me discover this solution!
Nope that is a setting that is unique to each individuals install. You must change that. I believe its in the installation documentation.
Deviloper
Cacti User
Posts: 256
Joined: Tue Jul 07, 2009 8:03 am

Re: Plugin Architecture Version 2.9 Released

Post by Deviloper »

Thx for the new Release!

Big Wish: Use a single global configuration file for all the cacti stuff...

@ the moment we have:
/etc/spine.conf
../include/config.php
cacti_rrdsvc

not to mention all the 3rd party stuff...

Thanks,
Boa
User avatar
bmarofsky
Posts: 49
Joined: Tue Aug 28, 2007 8:35 am
Location: Southington, CT

Re: Plugin Architecture Version 2.9 Released

Post by bmarofsky »

Can someone point me to documentation for upgrading PIA 2.8 to 2.9?

Thanks,
Brian

Cacti Version 0.8.7g
Plugin Architecture 2.8
Poller Type Cactid v
Server Info Linux 2.6.9-89.29.1.plus.c4
Web Server Apache/2.0.63 (CentOS)
PHP Version 5.1.6
MySQL Version 5.0.82sp1
RRDTool Version 1.2.23
SNMP Version 5.1.2
Plugins:
Global Plugin Settings (settings - v0.7)
Cycle Graphs (Cycle Graphs - v0.7+)
Thresholds (thold - v0.4.2)
Create Aggregate Graphs (aggregate - v0.75)
Device Monitoring (monitor - v1.2)
Network Tools (tools - v0.3)
Update Checker (update - v0.4)
Host Info (hostinfo - v0.2)
Error Images (errorimage - v0.1)
Cacti-ReportIt (reportit - v0.7.2)
WMI Query (wmi - v0.1)
Realtime Graph Viewer (realtime - v0.42)
Watermark (watermark - v0.1)
User avatar
bmarofsky
Posts: 49
Joined: Tue Aug 28, 2007 8:35 am
Location: Southington, CT

Re: Plugin Architecture Version 2.9 Released

Post by bmarofsky »

I found this:

http://docs.cacti.net/manual:087:1_installation.9_pia

Can anyone tell me if it is still current and applicable to 2.9? I remember when I went to v 2.8 I had issues, but don't remember which method I used. Also what is the command to import the pa.sql?

Thanks,
Brian

Cacti Version 0.8.7g
Plugin Architecture 2.8
Poller Type Cactid v
Server Info Linux 2.6.9-89.29.1.plus.c4
Web Server Apache/2.0.63 (CentOS)
PHP Version 5.1.6
MySQL Version 5.0.82sp1
RRDTool Version 1.2.23
SNMP Version 5.1.2
Plugins:
Global Plugin Settings (settings - v0.7)
Cycle Graphs (Cycle Graphs - v0.7+)
Thresholds (thold - v0.4.2)
Create Aggregate Graphs (aggregate - v0.75)
Device Monitoring (monitor - v1.2)
Network Tools (tools - v0.3)
Update Checker (update - v0.4)
Host Info (hostinfo - v0.2)
Error Images (errorimage - v0.1)
Cacti-ReportIt (reportit - v0.7.2)
WMI Query (wmi - v0.1)
Realtime Graph Viewer (realtime - v0.42)
Watermark (watermark - v0.1)
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests