Fix 64bit counters in Interface Traffic graphs

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
TheWitness
Developer
Posts: 16897
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Fix 64bit counters in Interface Traffic graphs

Post by TheWitness »

The following code would be better:

Code: Select all

REPLACE INTO ...
That way, regardless of how many times you do it, not INSERT error.

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?
shd
Cacti User
Posts: 96
Joined: Mon Apr 09, 2007 1:33 pm
Location: Nizhnevartovsk, Russia

Re: Fix 64bit counters in Interface Traffic graphs

Post by shd »

TheWitness wrote:The following code would be better:

Code: Select all

REPLACE INTO ...
That way, regardless of how many times you do it, not INSERT error.
Yeah, thanks, that can be added to the next version.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
86atc250r
Posts: 9
Joined: Wed Oct 02, 2013 12:22 pm

Re: Fix 64bit counters in Interface Traffic graphs

Post by 86atc250r »

Having a little trouble here...

This plugin seems to work in every way except actually fixing my graphs. If I click the icon next to the graph or do it from the graphs screen, everything seems to work fine setting wise, the graphs screen even shows the interfaces being tied to the 64bit counters selection. I've verified that the max in the database has been reset, and everything else seems to be good - however my graphs will still hit the 140mbps wall then reset to zero instead of displaying correctly.

At this point I'm not sure what else I can check or why the graphs aren't working properly when everything seems to be good.

I have a very large database of devices and interfaces, if this plugin works, it will help me fix a lot of old interfaces with 32bit counters very quickly. At this point not having much luck though.
shd
Cacti User
Posts: 96
Joined: Mon Apr 09, 2007 1:33 pm
Location: Nizhnevartovsk, Russia

Re: Fix 64bit counters in Interface Traffic graphs

Post by shd »

86atc250r wrote:Having a little trouble here...

This plugin seems to work in every way except actually fixing my graphs. If I click the icon next to the graph or do it from the graphs screen, everything seems to work fine setting wise, the graphs screen even shows the interfaces being tied to the 64bit counters selection. I've verified that the max in the database has been reset, and everything else seems to be good - however my graphs will still hit the 140mbps wall then reset to zero instead of displaying correctly.

At this point I'm not sure what else I can check or why the graphs aren't working properly when everything seems to be good.
Do you have any strange log entries during the poll after you set graph to fix?

Try to compare rrdtool info on files before and after fixing.

Check datasource info for fixed graph: did the template change? What's the new maximum?
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
86atc250r
Posts: 9
Joined: Wed Oct 02, 2013 12:22 pm

Re: Fix 64bit counters in Interface Traffic graphs

Post by 86atc250r »

Thanks for the quick response.

No strange log entries.

Is there a way to compare the rrdtool info on the files other than the datasource debug screen?

Yes the datasource info changed. See the screenshots I've attached.
Cacti Poller logs
Cacti Poller logs
cacti_logs.PNG (14 KiB) Viewed 11344 times
MySql database values for this datasource
MySql database values for this datasource
cacti_database.PNG (4.15 KiB) Viewed 11344 times
Datasource Before Conversion
Datasource Before Conversion
cacti_before.PNG (40.58 KiB) Viewed 11344 times
Datasource After Conversion
Datasource After Conversion
cacti_after.PNG (40.03 KiB) Viewed 11344 times
shd
Cacti User
Posts: 96
Joined: Mon Apr 09, 2007 1:33 pm
Location: Nizhnevartovsk, Russia

Re: Fix 64bit counters in Interface Traffic graphs

Post by shd »

86atc250r wrote:Thanks for the quick response.

No strange log entries.

Is there a way to compare the rrdtool info on the files other than the datasource debug screen?

Yes the datasource info changed. See the screenshots I've attached.
You can see rrdtool info by executing command "rrdtool info path-to-file.rrd".

Looks like everything is right, you have changed the datasource to 64-bit. May be there is a problem with a host you are polling? May be its 64-bit counters are not working right?
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
86atc250r
Posts: 9
Joined: Wed Oct 02, 2013 12:22 pm

Re: Fix 64bit counters in Interface Traffic graphs

Post by 86atc250r »

There's got to be something I'm missing here.. The 64bit counters are working fine.

Here is a screenshot of two graphs I just built for the same interface - one is 32bit the other is 64.
32vs64.PNG
32vs64.PNG (50.65 KiB) Viewed 11338 times
Here is the RRDTool comparison
rrd.PNG
rrd.PNG (54.64 KiB) Viewed 11338 times
shd
Cacti User
Posts: 96
Joined: Mon Apr 09, 2007 1:33 pm
Location: Nizhnevartovsk, Russia

Re: Fix 64bit counters in Interface Traffic graphs

Post by shd »

86atc250r wrote:There's got to be something I'm missing here.. The 64bit counters are working fine.

Here is a screenshot of two graphs I just built for the same interface - one is 32bit the other is 64.
RRD files are ok. Try checking output type id - is it really the needed one? I can't see anything beside that what can be incorrect.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Kimboaticus
Posts: 7
Joined: Sun Feb 16, 2014 9:10 pm

Re: Fix 64bit counters in Interface Traffic graphs

Post by Kimboaticus »

Hi Folks,

I'm trying to use this plugin to convert my "Interface - Traffic (bytes/sec, Total Bandwidth)" graphs over to a 64bit version. None of the graphs show the icon for the convert and mass selecting the graphs and trying to run the convert just shows they are all ineligible to be converted. I have attached a screen shot of the settings I have currently. Additionally, I tried another approach to see if I could get it to work by converting my existing graphs to "Interface - Traffic (bits/sec)" and adjusting the settings for the fix64 as suggested earlier in this post but they were not eligible either. If I added a new graph with those settings, it was eligible, so the problem is with my existing graphs somehow. I am running 8.8a and the plugin architecture is 3.1. I have tried turning off all other plugins to see if any of those are interfering but that didn't work either. I'm stumped on this one. Can anyone suggest a course of action? Thanks!
Attachments
Fix64.jpg
Fix64.jpg (47.83 KiB) Viewed 11091 times
Kimboaticus
Posts: 7
Joined: Sun Feb 16, 2014 9:10 pm

Re: Fix 64bit counters in Interface Traffic graphs

Post by Kimboaticus »

Actually, I think I have this sorted out now. I was able to create a new graph template for bytes with total for 64 bit and was then able to apply fix 64. The graphs are still updating so I think this worked.
shd
Cacti User
Posts: 96
Joined: Mon Apr 09, 2007 1:33 pm
Location: Nizhnevartovsk, Russia

Re: Fix 64bit counters in Interface Traffic graphs

Post by shd »

Kimboaticus wrote:I'm trying to use this plugin to convert my "Interface - Traffic (bytes/sec, Total Bandwidth)" graphs over to a 64bit version. None of the graphs show the icon for the convert and mass selecting the graphs and trying to run the convert just shows they are all ineligible to be converted.
Look for similar solution here.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Kimboaticus
Posts: 7
Joined: Sun Feb 16, 2014 9:10 pm

Re: Fix 64bit counters in Interface Traffic graphs

Post by Kimboaticus »

Thanks SHD, that is what fixed it for me. Now I am wondering what do I do if I want to change some of these converted graphs over to In/Out bits (64-bit)? As I see it, the plugin forces you to pick SNMP queries from the same type (both bits or both bytes) when you go into settings. Is there a way to modify things so that you can pick say In/Out Bytes (64-bit) for the SNMP search, and In/Out Bits (64-bit) for the desired SNMP? Or is this step in moving from a 64-bit byte graph to a 64-bit bit graph even necessary as the Data query is already set to use 64-bit counters, in which case, all you need to do is change the graph itself and everything else is already set as it should be?
shd
Cacti User
Posts: 96
Joined: Mon Apr 09, 2007 1:33 pm
Location: Nizhnevartovsk, Russia

Re: Fix 64bit counters in Interface Traffic graphs

Post by shd »

Kimboaticus wrote:Now I am wondering what do I do if I want to change some of these converted graphs over to In/Out bits (64-bit)?
I think after converting to 64-bit counters you can try go to Graph Management, select graphs you want to convert and chose "Change graph template" action at the bottom of a page. Not sure if it will work, so try with one graph first. And do backup.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Kimboaticus
Posts: 7
Joined: Sun Feb 16, 2014 9:10 pm

Re: Fix 64bit counters in Interface Traffic graphs

Post by Kimboaticus »

It appears to work doing it this way. The only thing that doesn't get changed is the Output Type ID in the Data Source. It stays as "In/Out Bytes with Total Bandwidth (64-bit Counters)". Not sure if this is entirely an issue as although they are two different outputs, they both use the 64-bit counters.
shd
Cacti User
Posts: 96
Joined: Mon Apr 09, 2007 1:33 pm
Location: Nizhnevartovsk, Russia

Re: Fix 64bit counters in Interface Traffic graphs

Post by shd »

Kimboaticus wrote:The only thing that doesn't get changed is the Output Type ID in the Data Source. It stays as "In/Out Bytes with Total Bandwidth (64-bit Counters)". Not sure if this is entirely an issue as although they are two different outputs, they both use the 64-bit counters.
You can change data template the same way as the graph template (at the Data Sources page), but it is unnecessary because it uses the same SNMP OID. So it's a matter of taste to change this template or not.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests