How to enable the Plugin Architecture

Support for the Plugin Architecture

Moderators: Developers, Moderators

y2k100
Posts: 4
Joined: Fri Dec 23, 2011 1:57 am

How to enable the Plugin Architecture

Post by y2k100 »

Hi everyone:

I use the Cacti V0.8.7i , how to install the plugin architecture(cacti-0.8.7i-PIA-3.1.tar.gz) ? I can not find the *.diff and *.sql files to install the plugin architecture , is this version different from the before ?

What different between the cacti-0.8.7i-PIA-3.1.tar.gz and cacti-plugin-0.8.7h-PA-v3.0.tar.gz ?

what different between the PIA and the PA package ?

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

Re: How to enable the Plugin Architecture

Post by TheWitness »

Just overlay the files over the existing install and import the sql file below into mysql. After doing so, goto User Management and verify that you have access to the 'Plugin Management' Realm.
Attachments
pa.zip
(610 Bytes) Downloaded 1178 times
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?
y2k100
Posts: 4
Joined: Fri Dec 23, 2011 1:57 am

Re: How to enable the Plugin Architecture

Post by y2k100 »

Thanks ! I will try it.
TheWitness wrote:Just overlay the files over the existing install and import the sql file below into mysql. After doing so, goto User Management and verify that you have access to the 'Plugin Management' Realm.
shikima
Posts: 17
Joined: Fri Aug 12, 2011 10:06 am

Re: How to enable the Plugin Architecture

Post by shikima »

I try to do this but I get this error

root@SERVERNOC:/usr/share/cacti# mysql -uroot -p cacti < pa.sql
Enter password:
ERROR 1050 (42S01) at line 5: Table 'plugin_config' already exists

Any Ideas?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: How to enable the Plugin Architecture

Post by gandalf »

You may have already "some" PIA tables available. When browsing that pa.sql file, you will see the tables that shall be installed. You may verify, using pgpMyAdmin or mysql native cli, which of them already are available.
R.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: How to enable the Plugin Architecture

Post by gandalf »

Or use the attached. It uses "CREATE TABLE IF NOT EXISTS" in favor of a simple "CREATE TABLE"
R.
Attachments
pa.sql.zip
(619 Bytes) Downloaded 648 times
shikima
Posts: 17
Joined: Fri Aug 12, 2011 10:06 am

Re: How to enable the Plugin Architecture

Post by shikima »

I already check it and yes, there is the table, so I made rollback and start over again, and now I didn't insert te pa.sql and everything work perfect!!!, just the changes of RRA folder and poller.php need the permissions for www-data:www:data. :wink:
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: How to enable the Plugin Architecture

Post by Rno »

TheWitness wrote:Just overlay the files over the existing install and import the sql file below into mysql. After doing so, goto User Management and verify that you have access to the 'Plugin Management' Realm.

And if I did all this work, and still don't get access to the plugin management what can I do ?
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
shikima
Posts: 17
Joined: Fri Aug 12, 2011 10:06 am

Re: How to enable the Plugin Architecture

Post by shikima »

can you post your config.php???
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: How to enable the Plugin Architecture

Post by cigamit »

Run this SQL query.

SELECT * FROM `plugin_hooks`;

Without any plugins installed, there should only be 2 entries.
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: How to enable the Plugin Architecture

Post by Rno »

Hello
So here is the request for the SQL command:
mysql> SELECT * FROM `plugin_hooks`;
+----+----------+----------------------+------+------------------------------+--------+
| id | name | hook | file | function | status |
+----+----------+----------------------+------+------------------------------+--------+
| 1 | internal | config_arrays | | plugin_c
onfig_arrays | 1 |
| 2 | internal | draw_navigation_text | | p
lugin_draw_navigation_text | 1 |
+----+----------+----------------------+------+------------------------------+--------+
2 rows in set (0.00 sec)


and the config.php (without password)
/* 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 = somepassword;
$database_port = "3306";
$database_ssl = false;

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

Nothing about plugin, since after 8.0.7g it's not necessary anymore !! (that's what I found on the forum)
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: How to enable the Plugin Architecture

Post by cigamit »

Can you check and see if the file <pathtocacti/plugins.php exists?
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: How to enable the Plugin Architecture

Post by Rno »

yes it does;:
root@tango:/usr/share/cacti# ls -l plugins.php
-rw-r--r-- 1 root root 27284 Dec 12 03:09 plugins.php

I just try to change the owner of the file to www-data, no change !!
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
shikima
Posts: 17
Joined: Fri Aug 12, 2011 10:06 am

Re: How to enable the Plugin Architecture

Post by shikima »

I needed add this line in config.php

$url_path = "/cacti/";

by the way, do you already have all your plugins in cacti/plugins/ ???
Rno
Cacti Pro User
Posts: 692
Joined: Wed Dec 07, 2011 9:19 am

Re: How to enable the Plugin Architecture

Post by Rno »

Ok I added this entry, and I have 2 plugin:
root@tango:/usr/share/cacti/plugins# ls -l
total 12
-rw-r--r-- 1 www-data root 44 Dec 12 03:09 index.php
drwxr-xr-x 5 www-data root 4096 Aug 18 2010 mactrack
drwxr-xr-x 9 www-data root 4096 Jan 3 17:29 weathermap

AD I even do a restart of mysql and apache2

No more luck
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest