Trouble with Thold 0.4.7-1

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Post Reply
joseme
Cacti User
Posts: 90
Joined: Fri May 15, 2009 9:36 am

Trouble with Thold 0.4.7-1

Post by joseme »

Hi:
I installed Thold 0.4.7-1, but I see an error log (each pool):

10/13/2011 12:45:05 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1064', SQL:"INSERT INTO plugin_thold_host_failed (host_id) VALUES )'

when I see that table:
mysql> select * from plugin_thold_host_failed;
Empty set (0.00 sec)

and..
mysql> desc plugin_thold_host_failed;
+---------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------+------------------+------+-----+---------+----------------+
| id | int(12) unsigned | NO | PRI | NULL | auto_increment |
| host_id | int(12) unsigned | NO | | NULL | |
+---------+------------------+------+-----+---------+----------------+
2 rows in set (0.00 sec)

By the way, for what is the field: "Notification email" on Devices? (look attached file). I guess an extra e-mail, but when I try to write one, that's not saved..

Regards...
Attachments
thold.JPG
thold.JPG (28.66 KiB) Viewed 3088 times
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Trouble with Thold 0.4.7-1

Post by TheWitness »

I'll have to take a look at that email issue. Take the latest SVN to fix the other issue. There are a number of issues that are being worked on at this time. Sorry about the release. It's 10 steps forward and 4 backward.

svn://svn.cacti.net/cacti_plugins/thold/branches/stable
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: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Trouble with Thold 0.4.7-1

Post by TheWitness »

joseme wrote:Hi:
I installed Thold 0.4.7-1, but I see an error log (each pool):

10/13/2011 12:45:05 PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1064', SQL:"INSERT INTO plugin_thold_host_failed (host_id) VALUES )'

when I see that table:
mysql> select * from plugin_thold_host_failed;
Empty set (0.00 sec)

and..
mysql> desc plugin_thold_host_failed;
+---------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------+------------------+------+-----+---------+----------------+
| id | int(12) unsigned | NO | PRI | NULL | auto_increment |
| host_id | int(12) unsigned | NO | | NULL | |
+---------+------------------+------+-----+---------+----------------+
2 rows in set (0.00 sec)

By the way, for what is the field: "Notification email" on Devices? (look attached file). I guess an extra e-mail, but when I try to write one, that's not saved..

Regards...
You must have attempted a patch instead of using the full files. In 4.7-1 there is NO "Notification Email" field. So, double check your numbers.

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?
joseme
Cacti User
Posts: 90
Joined: Fri May 15, 2009 9:36 am

Re: Trouble with Thold 0.4.7-1

Post by joseme »

Hi Witness:
I aplied the svn thold, and the error log dissapeared. :D
You're right, I made a mistake :oops: ,that "text field" was of "nmidupdownmonitor" plugin, I uninstalled it, so I hope Thold works for it...

thanks!!
sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

Re: Trouble with Thold 0.4.7-1

Post by sukanta »

Following Two issue found:


1) Threshold logic changed! Earlier was triggering if value is grater that threshold but now it is grater than equal to threshold.

Hope following changes is sufficient:

In thold_functions.php

Old:

Code: Select all

	if ($currentval != '') {
			$breach_up = ($item['thold_hi'] != '' && $currentval >= $item['thold_hi']);
			$breach_down = ($item['thold_low'] != '' && $currentval <= $item['thold_low']);
			$warning_breach_up = ($item['thold_warning_hi'] != '' && $currentval >= $item['thold_warning_hi']);
			$warning_breach_down = ($item['thold_warning_low'] != '' && $currentval <= $item['thold_warning_low']);
		}
New:

Code: Select all

 if ($currentval != '') {
			$breach_up = ($item['thold_hi'] != '' && $currentval > $item['thold_hi']);
			$breach_down = ($item['thold_low'] != '' && $currentval < $item['thold_low']);
			$warning_breach_up = ($item['thold_warning_hi'] != '' && $currentval > $item['thold_warning_hi']);
			$warning_breach_down = ($item['thold_warning_low'] != '' && $currentval < $item['thold_warning_low']);
		} 
Last edited by sukanta on Sat Oct 15, 2011 11:04 am, edited 4 times in total.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Trouble with Thold 0.4.7-1

Post by TheWitness »

I've asked Cigamit to comment on this.
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?
hmorandell
Cacti User
Posts: 73
Joined: Mon May 03, 2010 11:48 am

Re: Trouble with Thold 0.4.7-1

Post by hmorandell »

Hello,

I have the following problems:

I came from a previous version of thold (0.4.4.x) and I have about 500 tholds which are based on thold templates. The interface status is checked, if the status goes above 1.5 it should trigger an alert, if the status is 1 veerything is alright.

Since the upgtrade to the last version the logic is exactly vice-versa. When the interface is ok, I get an alert trigger, while when the interface is in error I get a message everything is alright.

This is not happening when I do not thols templates!!!

Anyone else experiencing the same problem?


example:
"SHDSL 0/0/0 Pair 1 [int_status] went above threshold of 1.5 with 1"
_________________
Cacti - 1.2.14
Poller Type - SPINE 1.2.14
Devices 3,892
Graphs 21,483
sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

Re: Trouble with Thold 0.4.7-1

Post by sukanta »

hmorandell wrote:Hello,

I have the following problems:

I came from a previous version of thold (0.4.4.x) and I have about 500 tholds which are based on thold templates. The interface status is checked, if the status goes above 1.5 it should trigger an alert, if the status is 1 veerything is alright.

Since the upgtrade to the last version the logic is exactly vice-versa. When the interface is ok, I get an alert trigger, while when the interface is in error I get a message everything is alright.

This is not happening when I do not thols templates!!!

Anyone else experiencing the same problem?


example:
"SHDSL 0/0/0 Pair 1 [int_status] went above threshold of 1.5 with 1"

Not Really but there was small change in logic which mention in this thread & which has been corrected in SVN 1882 (Thanks thewitness!)..
sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

Re: Trouble with Thold 0.4.7-1

Post by sukanta »

Another Small issue found:

Showing Rows is incorrect. It should be 1 to 30 as per attached setup & showing 1-30 results only.
thold_page.png
thold_page.png (4.98 KiB) Viewed 3028 times
hmorandell
Cacti User
Posts: 73
Joined: Mon May 03, 2010 11:48 am

Re: Trouble with Thold 0.4.7-1

Post by hmorandell »

There is an error in the last svn thold_functions.php file.

At line 1311 it is:
$breach_up = ($item['thold_hi'] != '' && $currentval < $item['thold_hi']);
while it should be:
$breach_up = ($item['thold_hi'] != '' && $currentval >= $item['thold_hi']);
This fixes my error! Hopefully someone can include this in the last SVN!
sukanta wrote:
hmorandell wrote:Hello,

I have the following problems:

I came from a previous version of thold (0.4.4.x) and I have about 500 tholds which are based on thold templates. The interface status is checked, if the status goes above 1.5 it should trigger an alert, if the status is 1 veerything is alright.

Since the upgtrade to the last version the logic is exactly vice-versa. When the interface is ok, I get an alert trigger, while when the interface is in error I get a message everything is alright.

This is not happening when I do not thols templates!!!

Anyone else experiencing the same problem?


example:
"SHDSL 0/0/0 Pair 1 [int_status] went above threshold of 1.5 with 1"

Not Really but there was small change in logic which mention in this thread & which has been corrected in SVN 1882 (Thanks thewitness!)..
_________________
Cacti - 1.2.14
Poller Type - SPINE 1.2.14
Devices 3,892
Graphs 21,483
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Trouble with Thold 0.4.7-1

Post by TheWitness »

This will be corrected in 0.4.8
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?
sukanta
Cacti User
Posts: 139
Joined: Tue Jan 26, 2010 6:12 am

Re: Trouble with Thold 0.4.7-1

Post by sukanta »

Weathermap Not Working after thold upgrade!

Rollback to 0.4.4


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

Re: Trouble with Thold 0.4.7-1

Post by TheWitness »

sukanta wrote:Weathermap Not Working after thold upgrade!

Rollback to 0.4.4


Pl investigate!
You investigate and let us know what you find. Thanks.
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 4 guests