Threshold Interface In/Out in Gigs instead of Megs

Support questions about the Threshold plugin

Moderators: Developers, Moderators

Post Reply
Nopales
Posts: 4
Joined: Mon Sep 26, 2022 9:30 pm

Threshold Interface In/Out in Gigs instead of Megs

Post by Nopales »

Just installed thold and am attempting to set up my first threshold for an interface on network devices. (I've tried both an HP Procurve Switch and PaloAlto firewall) The process of adding a non-templated threshold, selecting the device, graph, and data source. I set the Warn and Alert thresholds, see them in the correct location on the graph, but when it starts grabbing data it is calculating it as Gigs instead of Megs, and I'm assuming this may be some mis-calculation/translation from bits to bytes somewhere. I'm fairly new to the nuts and bolts (I have no idea what a CDEF is). This is a Gigabit interface, so there's no way it's doing 9.91Gigabits of traffic, and of course, that's over the warn and alert thresholds so I'm getting alerted. I see other posts that look similar but none of the ones I've looked at have a solution, or the solution they have is for something other than what is in the subject.

It seems like a common enough issue, is there a goto thread or resource you can point me to?
Screen Shot 2022-09-26 at 8.10.03 PM.png
Screen Shot 2022-09-26 at 8.10.03 PM.png (356.95 KiB) Viewed 4927 times
Ubuntu 20 focal fauna
Cacti 1.2.22
Thold 1.6
Mysql Ver 8.0.30
Php 7.4.3
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Threshold Interface In/Out in Gigs instead of Megs

Post by TheWitness »

Show the Thold Template or Thold Form that you are using or this Thold. Screen shots.
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?
Nopales
Posts: 4
Joined: Mon Sep 26, 2022 9:30 pm

Re: Threshold Interface In/Out in Gigs instead of Megs

Post by Nopales »

Thanks so much for the quick response. Here are some additional screenshots of the process. It looks like the graphing function is using the correct units (Megabits) and even showing the HRULEs in the correct location relative to the traffic in the graph, but the "Current" value is incorrect in both the management and view interfaces, as well as being used for generating the statuses, alerts, and warnings. This happens for interfaces on different devices types as well. Is there someplace where the values are being calculated or formatted? I've seen some suggestions to change a row in the mysql database to fix the issue, but I'm not sure if that applies to this situation or if that would have unexpected negative consequences. I'm comfortable with mysql and using the command-line if that would be helpful in generating diagnostic information.


Create step one:
Create_Step_1.png
Create_Step_1.png (771.74 KiB) Viewed 4923 times


Create step two:
Create_Step_2.png
Create_Step_2.png (448.68 KiB) Viewed 4923 times


Edit threshold after polling:
Edit_Threshold_After_Polling.png
Edit_Threshold_After_Polling.png (547.82 KiB) Viewed 4923 times

Threshold Management after polling:
Threshold_Management_After_Polling.png
Threshold_Management_After_Polling.png (146.8 KiB) Viewed 4923 times
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Threshold Interface In/Out in Gigs instead of Megs

Post by TheWitness »

What happens if you change the Data Manipulation to CDEF and the CDEF to Turn Bytes to Bits?
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: Threshold Interface In/Out in Gigs instead of Megs

Post by TheWitness »

Nice looking graphs by the way. I need to get back to working on Thold as the bugs and feature requests are stacking up. My problem is that there are not enough hours in the day.
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?
Nopales
Posts: 4
Joined: Mon Sep 26, 2022 9:30 pm

Re: Threshold Interface In/Out in Gigs instead of Megs

Post by Nopales »

I changed the the Data Manipulation to CDEF and the CDEF to Turn Bytes to Bits and it had no effect. (screenshot below)

When I look at the data source I get numbers:

Max: 2,000,000,000
Last DS: 185,331,699,840,686
Value: 228,425,384

So I'm trying to figure out how we are getting to the numbers in the thold plug-in. Is this configured somewhere? I looked at the tables in the DB plugin_thold* and nothing jumped out for me.

After changing to bytes to bits cdef datatype[
Screen Shot 2022-09-29 at 9.26.55 AM.png
Screen Shot 2022-09-29 at 9.26.55 AM.png (419.65 KiB) Viewed 4901 times
Data source for the item we are trying to use with thold[
Screen Shot 2022-09-29 at 9.42.17 AM.png
Screen Shot 2022-09-29 at 9.42.17 AM.png (365.67 KiB) Viewed 4901 times
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Threshold Interface In/Out in Gigs instead of Megs

Post by TheWitness »

Scratching my head on this as well. I've been meaning to get back into Thold issues, just lacking time. Pull requests are welcome of course.
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?
Nopales
Posts: 4
Joined: Mon Sep 26, 2022 9:30 pm

Re: Threshold Interface In/Out in Gigs instead of Megs

Post by Nopales »

Ah, Ok, thanks for scratchin'!

I think that all of my graphs are using 64bit counters and already have the bytes to bits CDEF applied, perhaps thold is applying the cdef again or expecting the number to be in bytes when it's already converted to bits? If this is the case, how do I fix this? Create another CDEF to / 8 and apply that somehow?

Another thought I had was that creating the thold from the create graphs interface might have a different result? Also, each interface datasource looks like it has a "Max" limit, I wonder if one could detect that, and if the thold current value is greater than the max value, provide some path to changing a setting. I'll submit a pull request if I get that far.
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Threshold Interface In/Out in Gigs instead of Megs

Post by TheWitness »

Just learn to use the cacti_log() function and put a bunch of cacti_log() statements in the code to see where the display conversion is happening. It's not that difficult. You will figure it out quickly. It'll take a while if you are not used to writing code, or used to basic problem flow.
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?
marachcr
Posts: 8
Joined: Thu Nov 02, 2017 4:42 pm

Re: Threshold Interface In/Out in Gigs instead of Megs

Post by marachcr »

Hello, I have the same problem. I would like to know if this problem has already been solved?
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Threshold Interface In/Out in Gigs instead of Megs

Post by TheWitness »

I'm pretty sure that macan fixed this some time ago. Maybe check out the latest tagged release. Tholds is in a bit of flux right now as we are doing some major plumbing work for the 2.0 release. It's going to be a big one, but not as big as the release after that though.
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 0 guests