Fix 64bit counters in Interface Traffic graphs

Announcements concerning Plugins for Cacti

Moderators: Moderators, Developers

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

Re: Fix 64bit counters in Interface Traffic graphs

#61 Post by TheWitness » Mon Dec 05, 2011 7:45 am

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 MacTrack, Boost, CLog, SpikeKill, Platform RTM, DSStats, maintainer of Spine, lot's of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Central Plugin Repository
Central Templates Repository


I'm still out there people. Getting excited for Cacti 1.2. I think it will be a great release.

shd
Cacti User
Posts: 96
Joined: Mon Apr 09, 2007 1:33 pm
Location: Nizhnevartovsk, Russia

Re: Fix 64bit counters in Interface Traffic graphs

#62 Post by shd » Tue Dec 06, 2011 1:03 am

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

#63 Post by 86atc250r » Thu Oct 10, 2013 11:05 am

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

#64 Post by shd » Thu Oct 10, 2013 12:15 pm

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

#65 Post by 86atc250r » Thu Oct 10, 2013 12:41 pm

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_logs.PNG
Cacti Poller logs
cacti_logs.PNG (14 KiB) Viewed 5833 times
cacti_database.PNG
MySql database values for this datasource
cacti_database.PNG (4.15 KiB) Viewed 5833 times
cacti_before.PNG
Datasource Before Conversion
cacti_before.PNG (40.58 KiB) Viewed 5833 times
cacti_after.PNG
Datasource After Conversion
cacti_after.PNG (40.03 KiB) Viewed 5833 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

#66 Post by shd » Fri Oct 11, 2013 1:55 am

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

#67 Post by 86atc250r » Fri Oct 11, 2013 9:31 am

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 5827 times
Here is the RRDTool comparison
rrd.PNG
rrd.PNG (54.64 KiB) Viewed 5827 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

#68 Post by shd » Fri Oct 11, 2013 1:43 pm

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

#69 Post by Kimboaticus » Mon Feb 17, 2014 1:58 am

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 5580 times

Kimboaticus
Posts: 7
Joined: Sun Feb 16, 2014 9:10 pm

Re: Fix 64bit counters in Interface Traffic graphs

#70 Post by Kimboaticus » Mon Feb 17, 2014 10:23 pm

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

#71 Post by shd » Mon Feb 17, 2014 11:06 pm

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

#72 Post by Kimboaticus » Wed Feb 19, 2014 11:09 pm

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

#73 Post by shd » Thu Feb 20, 2014 12:48 am

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

#74 Post by Kimboaticus » Thu Feb 20, 2014 11:03 am

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

#75 Post by shd » Thu Feb 27, 2014 5:38 am

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