Upgrade odl threshold version to the lastest

Support questions about the Threshold plugin

Moderators: Developers, Moderators

kenny29
Posts: 25
Joined: Thu Mar 05, 2009 7:38 am

Upgrade odl threshold version to the lastest

Post by kenny29 »

Hi,

I have an old threshold version but i want upgrade it to threshold V0.4.1.
I have notice that the thold.sql in the new version has news fields (NOT NULL).

Is there a migration script or do i need to rebuild database and create again all thresholds ?
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Check for the "upgrade.php" script located in the extra's folder.

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?
kenny29
Posts: 25
Joined: Thu Mar 05, 2009 7:38 am

Post by kenny29 »

Ho thx !

But do I don't understand very well how to do this. Do I need to paste the new direcrory version instead of the current Thold directory, end then run the file upgrade.php in command line?
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Ok confused now. It's an upgrade script. You run it.

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?
kenny29
Posts: 25
Joined: Thu Mar 05, 2009 7:38 am

Post by kenny29 »

Does Thold-0.4.1 can work with cacti-0.8.7b ? Because I have upgrade correctly thold but thold tab doesn't appear any more on Cacti Web page.

$plugins[] = 'thold'; is uncommented on global.php and config.php
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Well, config.php should have only database information. Also, I would suspect that it would work just fine. You will have to paste from your apache log the errors. You must have PIA 2.x though and the PA.SQL sourced.

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?
kenny29
Posts: 25
Joined: Thu Mar 05, 2009 7:38 am

Post by kenny29 »

I have installed PA v2.1 for Cacti 0.8.7b. When I look my apache2 error.log or cacti.log, there are no errors in relation with Thold.
kenny29
Posts: 25
Joined: Thu Mar 05, 2009 7:38 am

Post by kenny29 »

Well... I don't understand why my pa.sql wasn't in database cacti -_-. So I push table in Cacti database and NOW I have "Plugins Management". Thold is well installed.

Now, when I want to add a threshold template I have this error :

Error: A template with that Data Source already exists!

I have purge thold_template table in database but it doesn't change anything.

Is there a solution to solve that problem ?

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

Post by TheWitness »

In the told directory, there is an "upgrade.php" script. Run it. Do not uninstall the plugin, or you will loose all of your data. It's nasty that way (the PIA that is).

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?
kenny29
Posts: 25
Joined: Thu Mar 05, 2009 7:38 am

Post by kenny29 »

Hi Witness,

Yes but that 's I have done. I have just deleted the old thold directory. Then I have passed the new thold directory (v0.4.1) without change anything in database and I haven't touched Thold in plugin management. I run the upgrad.php script and upgrade was successful.

When I look my database I can see the thold tables were updated and all the data are there. But Thold in cacti doesn't see any data (No Thresholds).

I have tried the uprgade process for this post http://forums.cacti.net/viewtopic.php?t=31726
So I had the same mysql error and your solution solved it. But it doesn't change anything for me.... no threshold appears...

If I had a new threshold, Cacti return "Record Saved" but it isn't diplayed on threshold list.

On thershold template, cacti found a template but the diplay parameters for this template are wrong. Before the upgrade, it was a template base on baseline and now it's a template base on High / Low values... and if I try to change the type and save next, I have this error "Error : Save Failed"

I don't know what to do :(
User avatar
TheWitness
Developer
Posts: 16997
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Post the output of your dump command. It should be pretty small. Also, for my benefit, also post the thold*.sql from the plugin directory.

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?
kenny29
Posts: 25
Joined: Thu Mar 05, 2009 7:38 am

Post by kenny29 »

For my dump command I hace dumped all the thold tables (plugin_thold_contacts plugin_thold_template_contact plugin_thold_threshold_contact thold_data thold_template). So in the destination file I have all tables, their values and parameters but it's not pretty small.

I have add the thold.sql (thold.txt) from thold dir and then the file dump result (mycurr_thold.txt).
Attachments
mycurr_thold.txt
Dump result
(6.23 KiB) Downloaded 3113 times
thold.txt
thold.sql
(5.16 KiB) Downloaded 3208 times
kenny29
Posts: 25
Joined: Thu Mar 05, 2009 7:38 am

Post by kenny29 »

I have made a mysqldump of thold_data table and I have uninstall thold 0.4.1, so all tables were removed from database and for finish I removed the thold directory. After I make a basic install of thold 0.4.1 (without upgrade).

Now I can create template but an error appear when I want create a template using "Baseline". Indead if therse is no value for "Baseline deviation DOWN" cacti return this error :

Notice: Undefined index: bl_pct_down in /var/www/cacti/plugins/thold/thold_functions.php on line 404

Warning: Cannot modify header information - headers already sent by (output started at /var/www/cacti/plugins/thold/thold_functions.php:404) in /var/www/cacti/plugins/thold/thold_templates.php on line 353.

Perhaps you have a solution to solved that problem because normally you can leave the field blank.... I don't need baseline-LOW.

Then I did a mysqldump of thold_data table and all threshold are displayed on the console menu now. I don't understand why threshold are not diplayed on Thold tab on the other hand. When filter is empty nothing appears but when a put just a letter, all threshold containing this letter in their name are diplayed....

I have an other issue which is the double poller issue. I take a look from here http://docs.cacti.net/manual:087:4_help ... #debugging but I have on cron file (/etc/cron.d/cacti) with " */1 * * * * cacti /usr/bin/php /var/www/cacti/poller.php > /tmp/cacti.log " and nothing in crontab. When I enable threshold the second cacti poller process appears and after there is grabs on my graphs and the cacti log error " PM - SPINE: Poller[0] ERROR: Spine Timed Out While Processing Hosts Internal ".
If I disable threshold, second process poller disappears and all becomes again normal.

I must solve this problem quickly because I must put my cacti server in production soon.

Why cacti hates me :( ?!!!
cigamit
Developer
Posts: 3363
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

Is your MySQL running in strict mode?
kenny29
Posts: 25
Joined: Thu Mar 05, 2009 7:38 am

Post by kenny29 »

Hmmmm where can I see that ? I'm on a 5.0.32-Debian_7etch8.
In my conf file my.cnf there isn't a "mode" option.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests