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

Post by kenny29 »

I have deleted all my threshold en created them again. I have looked an interesting thing. If I have more than 1000 threshold enable, the second poller process begin to appear quickly.

My principal poller process appears all minutes and run during ~15 seconds when no threshold are enable. More I had threshold more the process time is long. Here I have ~2500 and principal poller appears during more than 50 seconds in process unix table, desappear then during 1 or 2 secondes and then when the new minute begin, it appears again (ps aux).

The error "PM - SPINE: Poller[0] ERROR: Spine Timed Out While Processing Hosts Internal " seem doesn't appear.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Well, you need to provide more information that what you have. Like your poller interval, you THold version, on an on an on. I would say, show the details. The top section of the technical support page, and your Plugin Management page, and if you are not at 0.8.7d, we can't help too much. There are not enough developers to remember all Cacti versions.

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 »

My Poller interval on cron file cacti is running all minutes (*/1 * * * * cacti /usr/bin/php /var/www/cacti/poller.php > /tmp/cacti.log)
Then on Cacti Cron Interval is "Every Minute" and Poller Interval is "Every Minute" too. I'm using spine

Maximum Concurrent Poller Processes = 1
Maximum Threads per Process = 3


Technical Support Page :

Technical Support
General Information
Date Fri, 27 Mar 2009 12:58:35 +0100
Cacti Version 0.8.7d
Cacti OS unix
SNMP Version NET-SNMP version: 5.2.3
RRDTool Version RRDTool 1.2.x
Hosts 140
Graphs 3851
Data Sources Script/Command: 5
SNMP Query: 3847
Total: 3852
Poller Information
Interval 60
Type spine
Items Action[0]: 7694
Action[1]: 5
Total: 7699
Concurrent Processes 1
Max Threads 3
PHP Servers 1
Script Timeout 25
Max OID 10
Last Run Statistics Time:14.6377 Method:spine Processes:1 Threads:3 Hosts:141 HostsPerProcess:141 DataSources:7695 RRDsProcessed:3805
PHP Information
PHP Version 5.2.0-8+etch13
PHP OS Linux
PHP uname Linux CactiAdminNew 2.6.18-6-486 #1 Fri Dec 12 16:18:30 UTC 2008 i686
PHP SNMP Installed
max_execution_time 30
memory_limit 16M
It is highly suggested that you alter you php.ini memory_limit to 120M or higher. This suggested memory value is calculated based on the number of data source present and is only to be used as a suggestion, actual values may vary system to system based on requirements.
MySQL Table Information
Name Rows Engine Collation Check Status
cdef 8 MyISAM latin1_swedish_ci OK
cdef_items 24 MyISAM latin1_swedish_ci OK
colors 101 MyISAM latin1_swedish_ci OK
data_input 12 MyISAM latin1_swedish_ci OK
data_input_data 46417 MyISAM latin1_swedish_ci OK
data_input_fields 47 MyISAM latin1_swedish_ci OK
data_local 3852 MyISAM latin1_swedish_ci OK
data_template 51 MyISAM latin1_swedish_ci OK
data_template_data 3903 MyISAM latin1_swedish_ci OK
data_template_data_rra 19473 MyISAM latin1_swedish_ci OK
data_template_rrd 7767 MyISAM latin1_swedish_ci OK
graph_local 3851 MyISAM latin1_swedish_ci OK
graph_template_input 88 MyISAM latin1_swedish_ci OK
graph_template_input_defs 295 MyISAM latin1_swedish_ci OK
graph_templates 39 MyISAM latin1_swedish_ci OK
graph_templates_gprint 3 MyISAM latin1_swedish_ci OK
graph_templates_graph 3890 MyISAM latin1_swedish_ci OK
graph_templates_item 42566 MyISAM latin1_swedish_ci OK
graph_tree 193 MyISAM latin1_swedish_ci OK
graph_tree_items 897 MyISAM latin1_swedish_ci OK
host 140 MyISAM latin1_swedish_ci OK
host_graph 143 MyISAM latin1_swedish_ci OK
host_snmp_cache 72240 MyISAM latin1_swedish_ci OK
host_snmp_query 140 MyISAM latin1_swedish_ci OK
host_template 8 MyISAM latin1_swedish_ci OK
host_template_graph 18 MyISAM latin1_swedish_ci OK
host_template_snmp_query 17 MyISAM latin1_swedish_ci OK
plugin_config 1 MyISAM latin1_swedish_ci OK
plugin_db_changes 164 MyISAM latin1_swedish_ci OK
plugin_hooks 26 MyISAM latin1_swedish_ci OK
plugin_realms 4 MyISAM latin1_swedish_ci OK
plugin_thold_contacts 180 MyISAM latin1_swedish_ci OK
plugin_thold_log 0 MyISAM latin1_swedish_ci OK
plugin_thold_template_contact 0 MyISAM latin1_swedish_ci OK
plugin_thold_threshold_contact 0 MyISAM latin1_swedish_ci OK
poller 0 MyISAM latin1_swedish_ci OK
poller_command 0 MyISAM latin1_swedish_ci OK
poller_item 7699 MyISAM latin1_swedish_ci OK
poller_output 0 MyISAM latin1_swedish_ci OK
poller_reindex 139 MyISAM latin1_swedish_ci OK
poller_time 1 MyISAM latin1_swedish_ci OK
rra 5 MyISAM latin1_swedish_ci OK
rra_cf 10 MyISAM latin1_swedish_ci OK
settings 133 MyISAM latin1_swedish_ci OK
settings_graphs 5742 MyISAM latin1_swedish_ci OK
settings_tree 0 MyISAM latin1_swedish_ci OK
snmp_query 12 MyISAM latin1_swedish_ci OK
snmp_query_graph 26 MyISAM latin1_swedish_ci OK
snmp_query_graph_rrd 48 MyISAM latin1_swedish_ci OK
snmp_query_graph_rrd_sv 98 MyISAM latin1_swedish_ci OK
snmp_query_graph_sv 68 MyISAM latin1_swedish_ci OK
thold_data 2509 MyISAM latin1_swedish_ci OK
thold_template 1 MyISAM latin1_swedish_ci OK
user_auth 178 MyISAM latin1_swedish_ci OK
user_auth_perms 445 MyISAM latin1_swedish_ci OK
user_auth_realm 557 MyISAM latin1_swedish_ci OK
user_log 181 MyISAM latin1_swedish_ci OK
version 1 MyISAM latin1_swedish_ci OK
weathermap_auth 2 MyISAM latin1_swedish_ci OK
weathermap_data 0 MyISAM latin1_swedish_ci OK
weathermap_maps 1 MyISAM latin1_swedish_ci OK


Plugin Management Page :

Plugin Management
Cacti
Version: 0.8.7d

Plugin Architecture
Version: 2.4

Thresholds
Directory: thold
Version: 0.4.1
Author: Jimmy Conner
Home Page: http://cactiusers.org
Status: Active
Install | Uninstall | Enable | Disable | Check

weathermap
Directory: weathermap
Version: 0.95b
Author: Howard Jones
Home Page:
Status: Old Plugin Architecture - Running

settings
Directory: settings
Version: 0.5
Author: Jimmy Conner
Home Page:
Status: Old Plugin Architecture - Running
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

1) Note this
It is highly suggested that you alter you php.ini memory_limit to 120M or higher. This suggested memory value is calculated based on the number of data source present and is only to be used as a suggestion, actual values may vary system to system based on requirements.
2) Use the spine-087d-pre2 and see if that helps
3) Consider using boost as you are at a 1 minute polling cycle. Use 2.4 for this version of Cacti.

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 »

Ok thanks I'll try that this afternoon.

Boost increase performances for updating rrd ?

I have an other question regarding the option "Toggle Threshold VRULES". I have enabled it. Am I supposed to see something on graphs about threshold ?

I think my Threshold aren't reliable beacause I don't understand why I have received an alert on the attachment files.
For some one it's normal I receive an alert but for others I should not receive alerts.

Threshold template : using baseline monitoring for Traffic Out with Reference in the past to 86400 and Time range to 10800. I'm using Baseline deviation UP to 50 (%) and Baseline Trigger Count to 3.

Could you tell me if it's normal (for the attachment files) to receive an alert ?
Attachments
Daily Trafic
Daily Trafic
capt1.JPG (82.38 KiB) Viewed 20145 times
Email Alert
Email Alert
capt2.JPG (48.84 KiB) Viewed 20145 times
cigamit
Developer
Posts: 3367
Joined: Thu Apr 07, 2005 3:29 pm
Location: B/CS Texas
Contact:

Post by cigamit »

Baseline really isn't made for how spiky your bandwidth is, unless you change the timespans out way further.
Mikf
Posts: 47
Joined: Fri Aug 13, 2004 11:35 am
Location: Paris, France

Post by Mikf »

hello,

the upgrade function do not work when using the enable button in plugin management.

it is working well after i have added "plugins.php" in the list $files of the check_upgrade function :

Code: Select all

--- old/thold/setup.php 2009-03-02 21:21:03.000000000 +0100
+++ new/thold/setup.php 2009-03-30 19:48:50.000000000 +0200
@@ -86,7 +86,7 @@
 function thold_check_upgrade () {
        global $config;
        // Let's only run this check if we are on a page that actually needs the data
-       $files = array('thold.php', 'thold_graph.php', 'thold_templates.php', 'listthold.php', 'poller.php');
+       $files = array('thold.php', 'thold_graph.php', 'thold_templates.php', 'listthold.php', 'poller.php','plugins.php');
        if (isset($_SERVER['PHP_SELF']) && !in_array(basename($_SERVER['PHP_SELF']), $files))
                return;
        $current = plugin_thold_version ();
kenny29
Posts: 25
Joined: Thu Mar 05, 2009 7:38 am

Post by kenny29 »

Thx for your help Milk.

I have modified the $files line in function thold_check_upgrade (). Do I need to disable thold plugin in plugin management and re-enable it for upgrade work well ?
Mikf
Posts: 47
Joined: Fri Aug 13, 2004 11:35 am
Location: Paris, France

Post by Mikf »

yes, that's what I have done.
:)

before : change this in include/database.php line 76, or you will not be able to modify templates.

- api_plugin_db_add_column ('thold', 'thold_template', array('name' => 'data_type', 'type' => 'int (3)', 'NULL' => false, 'default' => 0, 'after' => 'syslog_priority'));
+ api_plugin_db_add_column ('thold', 'thold_template', array('name' => 'data_type', 'type' => 'int (3)', 'NULL' => false, 'default' => 0, 'after' => 'notify_extra'));
kenny29
Posts: 25
Joined: Thu Mar 05, 2009 7:38 am

Post by kenny29 »

There is already api_plugin_db_add_column ('thold', 'thold_template', array('name' => 'data_type', 'type' => 'int (3)', 'NULL' => false, 'default' => 0, 'after' => 'notify_extra')); in my database.php

So I disable and re-enable thold plugin but when I modify parameters of my threshold template I have already the error below. But when I return on cacti the modification is OK.

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.
Mikf
Posts: 47
Joined: Fri Aug 13, 2004 11:35 am
Location: Paris, France

Post by Mikf »

ok, I have the same error (baseline was not tested)

I changed the code like this and now it is working :)

Code: Select all

--- thold/thold_functions.php   2009-03-02 21:21:03.000000000 +0100
+++ /home/admm/jhu/thold_functions.php  2009-04-09 12:08:55.000000000 +0200
@@ -346,8 +346,8 @@
                                                $desc .= '  Enabled: ' . $message['bl_enabled'];
                                                $desc .= '  Reference: ' . $message['bl_ref_time'];
                                                $desc .= '  Range: ' . $message['bl_ref_time_range'];
-                                               $desc .= '  Dev Up: ' . $message['bl_pct_down'];
-                                               $desc .= '  Dev Down: ' . $message['bl_pct_up'];
+                                               $desc .= '  Dev Up: ' . (isset($message['bl_pct_up'])? $message['bl_pct_up'] : "" );
+                                               $desc .= '  Dev Down: ' . (isset($message['bl_pct_down'])? $message['bl_pct_down'] : "" );
                                                $desc .= '  Trigger: ' . $message['bl_fail_trigger'];
                                                break;
                                        case 2:
@@ -401,8 +401,8 @@
                                        $desc .= '  Enabled: ' . $message['bl_enabled'];
                                        $desc .= '  Reference: ' . $message['bl_ref_time'];
                                        $desc .= '  Range: ' . $message['bl_ref_time_range'];
-                                       $desc .= '  Dev Up: ' . $message['bl_pct_down'];
-                                       $desc .= '  Dev Down: ' . $message['bl_pct_up'];
+                                       $desc .= '  Dev Up: ' . (isset($message['bl_pct_up'])? $message['bl_pct_up'] : "" );
+                                       $desc .= '  Dev Down: ' . (isset($message['bl_pct_down'])? $message['bl_pct_down'] : "" );
                                        $desc .= '  Trigger: ' . $message['bl_fail_trigger'];
                                        break;
                                case 2:

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

Post by kenny29 »

Thx Milk now it works perfectly for thershold template :).

Now my problem is which type of threshold templates I must use. Could you tell me how worked the Baseline Trigger Count when using baseline for Threshold. I don't understand what is "Leave empty to use default value (Default: 3 cycles)".
Which Cycle it is ?? The Cron Interval ? Poller Interval ?...

My Cron and Poller Interval are both at 1 minute.

I think there is a problem with baseline. Actually I'm using baseline with a Reference in the past of 1 day and a time range of 3 hours. I need to use Baseline deviation UP with 100 (%) and I don't need Baseline deviation DOWN so the case isn't set. Normaly if not set, lower bound threshold will not be checked at all but i receive alerts from Thold with this message :

XXX went below threshold of with 41.9299 at trigger 0 out of 0.

All alert are below and I have nothing "above" the baseline whereas I would receive alert with like this "XXX went above calculated baseline threshold with XXX

And for finish an other amazing thing, if I set Deviation Up or Down or both and then if I try to remove the value I can't. There is no error returned after saving but the value is still set. I must remove it from the database. I can change it on the other hand.
I think it's a bug.
That is reflected on all my threshold because I have the Template Propagation Enabled. Same if deviation up and down aren't setted on template, all thresohld have again the old value in up and down deviation and I can't remove them or I need to go to the database.
kenny29
Posts: 25
Joined: Thu Mar 05, 2009 7:38 am

Post by kenny29 »

I have solved my problem with threshold now. I have just modified a little bit thold_function.php file.
mithandra
Posts: 46
Joined: Wed Jul 14, 2010 8:19 am

Post by mithandra »

i had exactly the same issue and solved this by running the command

php ./upgrade.php from the extras directory

all sprang into life after this db upgrade. this is the only thread in 2 hours i have seen with mention of the extras dir and the upgrade script, maybe someone should make a sticky?

thanks mithandra
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests