Compatibility with Cacti 1.0.0

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Post Reply
kjstech
Cacti User
Posts: 97
Joined: Thu Feb 28, 2013 2:57 pm

Compatibility with Cacti 1.0.0

Post by kjstech »

I cloned our cacti installation into a new dev box and upgraded 0.8.8b to 1.0.0.

I finally got it up and running but the thold plugin claims its missing a dependency, the settings plugin. I thought the changelog for Cacti 1.0.0 said that features from the settings plugin are now merged into a unified plugin architecture. Well the settings plugin shows up as I copied it over to /plugins of the new install but it will not remain active.

Any idea how to get thold like functionality in cacti 1.0.0?
kjstech
Cacti User
Posts: 97
Joined: Thu Feb 28, 2013 2:57 pm

Re: Compatibility with Cacti 1.0.0

Post by kjstech »

Thank you!
dagonet
Cacti User
Posts: 90
Joined: Sat Oct 29, 2005 4:05 pm
Location: Wuerzburg

Re: Compatibility with Cacti 1.0.0

Post by dagonet »

I get heaps of errors with cacti 1.0 and the actual thold plugin:
ERROR PHP NOTICE: Undefined index: thold_draw_vrules in file: D:\httpd\apache24\htdocs\cacti\plugins\thold\setup.php on line: 176
Any hints on that?
kjstech
Cacti User
Posts: 97
Joined: Thu Feb 28, 2013 2:57 pm

Re: Compatibility with Cacti 1.0.0

Post by kjstech »

I got it to work in an Ubuntu 14.04.1 LTS running 3.2.0-35 kernel. I cloned our existing cacti linux vm and gave it a new IP/hostname and running both now to not interfere with production. I documented all of the steps and gotchas (I had a lot of mysql tweaks to do in order to update Cacti). So thold 1.0 plugin is working for me but unfortunately I have to add in all of our triggered thresholds. It did not seem to carry over from the previous version. Fortunately with two systems running side by side I can enter then fairly quickly.

I also noticed when using the new modern "Paws" theme of Cacti (which I love btw), the Thold tab line items are not color coded. I'll have to play around and see if thats the case in the other themes.

EDIT: Also I just tried to add a threshold and once I hit add it just nested the frame inside the frame of Cacti.
Attachments
cacti-thold.PNG
cacti-thold.PNG (75.04 KiB) Viewed 3318 times
kjstech
Cacti User
Posts: 97
Joined: Thu Feb 28, 2013 2:57 pm

Re: Compatibility with Cacti 1.0.0

Post by kjstech »

I tried with the classic theme and I still get the same result. I cannot complete adding a threshold. I click thresholds, add, choose the device, then choose the graph, then choose the data source, and once I hit the create button it just reloads the cacti page inside this frame.

I also tried an export of templates from current production thold 0.5 and got an xml file. However in the new thold 1.0 when I go to import that xml file, the screen just flashes like it took, but you go back out and in and there's nothing there.
Attachments
cacti-thold-classic-plugin.PNG
cacti-thold-classic-plugin.PNG (126.03 KiB) Viewed 3318 times
kjstech
Cacti User
Posts: 97
Joined: Thu Feb 28, 2013 2:57 pm

Re: Compatibility with Cacti 1.0.0

Post by kjstech »

Ok I tried it again, this time with tailing the apache2 error log file. The second I click create these types of errors appear:
PHP Notice: Undefined index: thold_hrule_warning in /var/www/cacti/lib/database.php on line 891
PHP Notice: Undefined index: thold_hrule_warning in /var/www/cacti/lib/database.php on line 892
PHP Notice: Undefined index: thold_hrule_warning in /var/www/cacti/lib/database.php on line 893
PHP Notice: Undefined index: thold_hrule_warning in /var/www/cacti/lib/database.php on line 894
PHP Notice: Undefined index: thold_hrule_alert in /var/www/cacti/lib/database.php on line 891
PHP Notice: Undefined index: thold_hrule_alert in /var/www/cacti/lib/database.php on line 892
PHP Notice: Undefined index: thold_hrule_alert in /var/www/cacti/lib/database.php on line 893
PHP Notice: Undefined index: thold_hrule_alert in /var/www/cacti/lib/database.php on line 894

If I look at that file it contains this code:

Code: Select all

891: if (strstr($cols[$key]['type'], 'int') !== false ||
892:    strstr($cols[$key]['type'], 'float') !== false ||
893:    strstr($cols[$key]['type'], 'double') !== false ||
894:    strstr($cols[$key]['type'], 'decimal') !== false) {

I'm sure it's something to do with the thold database tables under the mysql cacti database. I did check them in phpmyadmin and they look clean (no data in them - returning 0 rows). These are the database tables I have under the cacti database:
plugin_thold_contacts
plugin_thold_daemon_data
plugin_thold_daemon_processes
plugin_thold_host_failed
plugin_thold_template
plugin_thold_log
plugin_thold_template_contact
plugin_thold_threshold_contact
thold_data
thold_template

I don't know if any of this is remnance of the old 0.5 version of thold that is causing a conflict, but when I added and installed the new thold 1.0 in Cacti Plugin manager, I would suppose it would script out creating the proper mysql database tables.
kjstech
Cacti User
Posts: 97
Joined: Thu Feb 28, 2013 2:57 pm

Re: Compatibility with Cacti 1.0.0

Post by kjstech »

Ok there is a bug with thold 1.0 and it does not create all the required database tables. They released a patch here: https://github.com/Cacti/plugin_thold/issues/38

Sounds like your Windows install so I have no idea how to extract a patch file, but in Linux:
cd PATH_TO_CACTI/plugins
unzip thold.zip
patch -p0 < thold.patch


I had to remove the plugin in Cacti plugin management and then in phpmyadmin drop the thold tables:
plugin_thold_contacts
plugin_thold_daemon_data
plugin_thold_daemon_processes
plugin_thold_host_failed
plugin_thold_template
plugin_thold_log
plugin_thold_template_contact
plugin_thold_threshold_contact
thold_data
thold_template

Then back in Cacti Plugin management click to install thold and then activate it. Now everything seems to be working (so far)!
dagonet
Cacti User
Posts: 90
Joined: Sat Oct 29, 2005 4:05 pm
Location: Wuerzburg

Re: Compatibility with Cacti 1.0.0

Post by dagonet »

dagonet wrote:I get heaps of errors with cacti 1.0 and the actual thold plugin:
ERROR PHP NOTICE: Undefined index: thold_draw_vrules in file: D:\httpd\apache24\htdocs\cacti\plugins\thold\setup.php on line: 176
Any hints on that?
No support from the developer on this issue either?
It is evident that the actual thold plugin 1.0 doesn't work as expected with cacti 1.0.
cigamit
Developer
Posts: 3369
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Re: Compatibility with Cacti 1.0.0

Post by cigamit »

dagonet wrote:
dagonet wrote:I get heaps of errors with cacti 1.0 and the actual thold plugin:
ERROR PHP NOTICE: Undefined index: thold_draw_vrules in file: D:\httpd\apache24\htdocs\cacti\plugins\thold\setup.php on line: 176
Any hints on that?
No support from the developer on this issue either?
It is evident that the actual thold plugin 1.0 doesn't work as expected with cacti 1.0.
It is evident that you haven't bothered to check git, as these issues were patched days ago.
https://github.com/Cacti/plugin_thold/commits/master
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest