Thold graph view Number of Row, dosen't match the presentend line

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Post Reply
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Thold graph view Number of Row, dosen't match the presentend line

Post by Rno »

Hello,
I did some clean up of my monitored link, and now my count of number of breached Threshold dosen't match the displayed line.

I have 18 On the top:
All 18 Thresholds


But only 17 displayed.

If I do a simple query like that on my DB:

Code: Select all

SELECT * FROM `thold_data` AS td where (td.thold_enabled = 'on' AND ((td.thold_alert != 0 OR td.bl_alert > 0)) ) 
I got 17 rows.

And I'm administrator, so i't not a issue about user name.

It's on cacti 1.2.25, and I uprade Thold this morning.

EDIT:
It's look like it's only happening when I select the status Breached
When I select triggered, the count is correct.
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
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Thold graph view Number of Row, dosen't match the presentend line

Post by TheWitness »

Keep us posted.
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?
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Re: Thold graph view Number of Row, dosen't match the presentend line

Post by Rno »

So looking deeper on this I have some question:
On thold_graph.php, under 'function tholds'
line 329 and below:

Code: Select all

		'status' => array(
			'filter' => FILTER_VALIDATE_INT,
			'pageset' => true,
			'default' => $default_status
But on the URL you only use state, not status
/cacti/plugins/thold/thold_graph.php?action=thold&state=1&thold_template_id=-1&data_template_id=-1&host_id=-1&site_id=-1&rows=-1&rfilter=

So how the filter in line 356-365 suppose to work ?

Code: Select all

	/* status filter */
	if (get_request_var('status') == '-1') {
		/* return all rows */
	} else {
		if (get_request_var('status') == '0') { $sql_where = "(td.thold_enabled = 'off'"; } /*disabled*/
		if (get_request_var('status') == '2') { $sql_where = "(td.thold_enabled = 'on'"; } /* enabled */
		if (get_request_var('status') == '1') { $sql_where = "(td.thold_enabled = 'on' AND ((td.thold_alert != 0 OR td.bl_alert > 0))"; } /* breached */
		if (get_request_var('status') == '3') { $sql_where = "(td.thold_enabled = 'on' AND (((td.thold_alert != 0 AND td.thold_fail_count >= td.thold_fail_trigger) OR (td.bl_alert > 0 AND td.bl_fail_count >= td.bl_fail_trigger)))"; } /* status */
		if (get_request_var('status') == '4') { $sql_where = "(td.acknowledgment = 'on'"; } /* status */
	}
Then I will go further after that.
thanks
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
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Re: Thold graph view Number of Row, dosen't match the presentend line

Post by Rno »

Damn I was looking of the old code.

But still the error is present in production, but my research where in the wrong version!

My synchro between my serveur and my desktop is way not ptimize

Will have to fix this
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
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Thold graph view Number of Row, dosen't match the presentend line

Post by TheWitness »

Di you open a bug in GitHub?
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 3 guests