PIA 2.x - Documentation ?

Support for the Plugin Architecture

Moderators: Developers, Moderators

Post Reply
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

PIA 2.x - Documentation ?

Post by phalek »

Is there a documentation already available for plugin developers ? I want to update/add the new PA 2.x features into my plugins. Anyone already "reverse-documented" the new features ?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Not reverse documented. Simply used. See AGGREGATE and RRDCleaner. Poorly documented, though. My source was THOLD as of current SVN.
I'd first try to get the new "Install/Activate" thingies done. Does not require an entry for include/global.php (unless you want to keep backward compatibility).
Next, target the code to create/modify plugin specific MySQL tables, if any. I really love it!
Last, I'd try the permssions/realm thingies. Rest should work unchanged.
You may want to keep an eye at current handling of displaying tables. This is a pure 087(b) feature but it's very nice!
To some degree, you will have to decide how to handle backward compatibility. Keeping it will at least double "some" part of the code and may lead to errors
Reinhard
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

Reinhard, i don't have see your code but i check my code under thold svn, last week
i choosed to leave compatibility and migrate to full PA 2.0
(i have a double "RRD Cleaner" listed in user management, but maybe it's not relative to that)

i think dynamic availability of plugin realms is cool

in my "reverse-engeenired", i have found some minors bugs (mail and uninstall links)
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

Thanks for the infos.

Gilles, I have the very same problem ( PA 2.0 ). It seems to be related to the PA calling "api_plugin_register_realm" and also add the stuff from the config_array sub-function, So I also end up having double entries in the settings section.

Is there a way of saying the following:

Code: Select all

if PA 2.x is installed {
  call api_plugin_register_realm ...
}
else {
  do the normal pre PA 2.x config array stuff
}

Gandalf, I didn't find anything in your rrdclean code that solves this, don't you have the double entries, also ?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Will have to confirm. To be honest, I did not pay much attention to it. But the proposal above makes much sense.
Another option _should_ be not to enter plugin names to global.php for those plugins, that already support the "new way"
Reinhard
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Hmm. Ok interesting. Jimmy was planning a 2.2 to address a few experimental hooks. I guess I will apply Gandolf's revised plugins with PIA 2.1 and look for the buglet's.

Regards,

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

Gandalf,

Just to clarify, the double entries show up even if you comment out the plugin in the global.php file, so just using the PA 2.x stuff.
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Where's my fly swatter ;)

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
divagater
Cacti User
Posts: 191
Joined: Wed Nov 17, 2004 5:22 pm
Location: Chapel Hill, NC.
Contact:

Post by divagater »

Hey guys. Does anone know of a plugin that fully (or mostly) implements the latest features of PA 2.1?

I saw aggregate mentioned and am looking at that. The setup.php seems to include a fair number of the new hooks but I have not got it to actually work in 0.8.7b with PA 2.1. Its tables are not being created, no entry under console->Plugin Management, no entry in plugin_realms table. I did add $plugins[] = 'aggregate'; to global.php but I am not sure if that is needed with 2.1.

I saw a post from fmangeant quoting cigamit 6 weeks back suggesting there would be a new version of thold utilizing the new features but as of thold-0.3.9 I don't see any of the new hooks/methods in setup.php.

Just trying to get a handle on 2.1 features and appreciate any insight :)

Cheers,
Billy
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

divagater wrote:I did add $plugins[] = 'aggregate'; to global.php but I am not sure if that is needed with 2.1.
Update Plugin need this row.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Is it just me, or is the PIA actually getting less supported rather than more supported lately (2.0 onwards)?

Roll on 0.8.8...
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
phalek
Developer
Posts: 2838
Joined: Thu Jan 31, 2008 6:39 am
Location: Kressbronn, Germany
Contact:

Post by phalek »

Hi Howie,

What do you mean:

1) PIA is less supported by the devlopers of PIA

2) PIA is not (yet) supported by the plugin developers.


In case of number 2: it's probably because there's no "HowTo change pre PIA 2.x plugins to PIA 2.x" around ... ? All there is for the moment are plugins who used a svn source to look for PIA 2.x changes. (see http://cactiusers.org/forums/topic1383.html )
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

phalek wrote:Hi Howie,

What do you mean:

1) PIA is less supported by the devlopers of PIA

2) PIA is not (yet) supported by the plugin developers.


In case of number 2: it's probably because there's no "HowTo change pre PIA 2.x plugins to PIA 2.x" around ... ? All there is for the moment are plugins who used a svn source to look for PIA 2.x changes. (see http://cactiusers.org/forums/topic1383.html )
1 mostly. No docs, problems with little feedback (base_url problems).

It's a little frustrating as a user when on the one hand you have security issues in Cacti (or spine issues, for example) that force you into upgrading to 0.8.7(ab), and on the other the only PIA for those versions seems to have more problems than older ones. The base_url issue is even the second time around.

I'll stop moaning now.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Howie wrote:Is it just me, or is the PIA actually getting less supported rather than more supported lately (2.0 onwards)?

Roll on 0.8.8...
Jimmy has been MIA for a bit. Maybe it's a little burnout... Could be that he is building a new house on a farm in the middle of BFE and has to spend most of his free time on that...

http://forums.cacti.net/viewtopic.php?t=26670

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
User avatar
TheWitness
Developer
Posts: 17059
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

I'll do a little writeup to supplement what is in the docs site. However, the changes are pretty significant. The only real issue with current plugins is the rather nasty issue related to batch performance brought on about by the cross site scripting issue.

If fixed that just yesterday in the BETA2.2 release.

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

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests