Error on Thold after cleanup

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

Error on Thold after cleanup

Post by Rno »

Hello again,
I did some clean up of my link, mostly remove graph on interface that are no longer in used.

And Since I got some error like that on my log:

Code: Select all

02/11/2023 15:06:12 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php[780]:process_poller_output(), /lib/poller.php[805]:api_plugin_hook_function(), /lib/plugins.php[155]:api_plugin_run_plugin_hook_function(), /lib/plugins.php[276]:thold_poller_output(), /plugins/thold/includes/polling.php[177]:thold_calculate_expression(), /plugins/thold/thold_functions.php[904]:get_current_value(), /plugins/thold/thold_functions.php[4706]:CactiErrorHandler())
02/11/2023 15:06:12 - ERROR PHP NOTICE in Plugin 'thold': Trying to access array offset on value of type null in file: /usr/share/cacti/plugins/thold/thold_functions.php on line: 4706
02/11/2023 15:06:12 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php[780]:process_poller_output(), /lib/poller.php[805]:api_plugin_hook_function(), /lib/plugins.php[155]:api_plugin_run_plugin_hook_function(), /lib/plugins.php[276]:thold_poller_output(), /plugins/thold/includes/polling.php[177]:thold_calculate_expression(), /plugins/thold/thold_functions.php[904]:get_current_value(), /plugins/thold/thold_functions.php[4706]:CactiErrorHandler())
02/11/2023 15:06:12 - ERROR PHP NOTICE in Plugin 'thold': Undefined index: values in file: /usr/share/cacti/plugins/thold/thold_functions.php on line: 4706
02/11/2023 15:06:12 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php[780]:process_poller_output(), /lib/poller.php[805]:api_plugin_hook_function(), /lib/plugins.php[155]:api_plugin_run_plugin_hook_function(), /lib/plugins.php[276]:thold_poller_output(), /plugins/thold/includes/polling.php[177]:thold_calculate_expression(), /plugins/thold/thold_functions.php[904]:get_current_value(), /plugins/thold/thold_functions.php[4706]:CactiErrorHandler())
02/11/2023 15:06:12 - ERROR PHP NOTICE in Plugin 'thold': Trying to access array offset on value of type null in file: /usr/share/cacti/plugins/thold/thold_functions.php on line: 4706
02/11/2023 15:06:12 - CMDPHP PHP ERROR NOTICE Backtrace: (/poller.php[780]:process_poller_output(), /lib/poller.php[805]:api_plugin_hook_function(), /lib/plugins.php[155]:api_plugin_run_plugin_hook_function(), /lib/plugins.php[276]:thold_poller_output(), /plugins/thold/includes/polling.php[177]:thold_calculate_expression(), /plugins/thold/thold_functions.php[904]:get_current_value(), /plugins/thold/thold_functions.php[4706]:CactiErrorHandler())
02/11/2023 15:06:12 - ERROR PHP NOTICE in Plugin 'thold': Undefined index: values in file: /usr/share/cacti/plugins/thold/thold_functions.php on line: 4706

How Can I clean up the threshold to be sure they have a graph linked to it ?

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

Re: Error on Thold after cleanup

Post by TheWitness »

Hey Rno,

Is this the latest develop of thold? I'm still trying to find time to get it released.
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: Error on Thold after cleanup

Post by Rno »

Hello,
Yes the one I upload the 2nd november.
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: Error on Thold after cleanup

Post by TheWitness »

Never mind, change 4704 to this:

Code: Select all

if (!isset($result['values']) || $idx === null || !cacti_sizeof($result['values'][$idx])) {
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: Error on Thold after cleanup

Post by TheWitness »

Kind of hack this in for now. I'm still working on a commit that's a bit larger. I might be able to merge this shortly, it just depends on what I have to toss out locally ;)
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: Error on Thold after cleanup

Post by TheWitness »

I just pushed the change still holding back everything else.
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: Error on Thold after cleanup

Post by Rno »

Hello,
So I upgrade my thold with the latest dev branch, and it's working fine now.
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
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests