Fix 64bit counters in Interface Traffic graphs
Moderators: Developers, Moderators
Fix 64bit counters in Interface Traffic graphs
Sometimes you want to convert some interfaces from 32bit interface counters to 64bit. Normally you should go in Data Sources page, find data source for wanted graph, change its input type, then reset maximum in rrd file, then reset the maximum in database. Too many movements. To automate this I made little plugin - Fix 64bit Counters.
With this plugin you only click on image near the graph you want to convert, and all the dirty work is made by script.
Installation is simple, like any other plugin - just copy its folder in plugins directory, enable it in Plugin Management, then give rights to users in User Management, then go to Settings/Misc, check settings to be like in the screenshot and hit Save:
Hit save for one time even if settings from the beginning are totally like in the screenshot - just in case.
Also you can choose graphs to convert in the “Graph Management” page. Just select needed graphs, choose a “Fix 64bit Counters” action in dropdown and hit “Ok”.
If graphs could not be converted, you will receive corresponding message and when you press “Continue” it will fix all the graphs that it can fix.
Fixing process is performed after the next run of poller (this is due to the need to edit rrd file), so 64bit counters are begin to work only after two polls. Checks are rather thorough, plugin checks SNMP version (it should be 2 or greater) and every SNMP query constraints.
May be this plugin would save a day or two for someone.
Icon is from FamFamFam Silk Icons.
ChangeLog
--- 0.5 ---
Cacti 1.0 compatibility
--- 0.4 ---
Updated graphs spiking fix (thanks, mitchese!)
update_poller_cache fix for Cacti 8.8.a (thanks, mitchese!)
--- 0.3 ---
Added mass graph fixing through the “Graph Management” page.
Uninstall and then reinstall plugin to use this functionality.
--- 0.2 ---
Replaced short tags "<?" with long tags "<?php"
Code cleanup
--- 0.1 ---
Initial release
Plugin page: http://docs.cacti.net/userplugin:fix64bit
Plugin github page: https://github.com/simnv/fix64bit
With this plugin you only click on image near the graph you want to convert, and all the dirty work is made by script.
Installation is simple, like any other plugin - just copy its folder in plugins directory, enable it in Plugin Management, then give rights to users in User Management, then go to Settings/Misc, check settings to be like in the screenshot and hit Save:
Hit save for one time even if settings from the beginning are totally like in the screenshot - just in case.
Also you can choose graphs to convert in the “Graph Management” page. Just select needed graphs, choose a “Fix 64bit Counters” action in dropdown and hit “Ok”.
If graphs could not be converted, you will receive corresponding message and when you press “Continue” it will fix all the graphs that it can fix.
Fixing process is performed after the next run of poller (this is due to the need to edit rrd file), so 64bit counters are begin to work only after two polls. Checks are rather thorough, plugin checks SNMP version (it should be 2 or greater) and every SNMP query constraints.
May be this plugin would save a day or two for someone.
Icon is from FamFamFam Silk Icons.
ChangeLog
--- 0.5 ---
Cacti 1.0 compatibility
--- 0.4 ---
Updated graphs spiking fix (thanks, mitchese!)
update_poller_cache fix for Cacti 8.8.a (thanks, mitchese!)
--- 0.3 ---
Added mass graph fixing through the “Graph Management” page.
Uninstall and then reinstall plugin to use this functionality.
--- 0.2 ---
Replaced short tags "<?" with long tags "<?php"
Code cleanup
--- 0.1 ---
Initial release
Plugin page: http://docs.cacti.net/userplugin:fix64bit
Plugin github page: https://github.com/simnv/fix64bit
- Attachments
-
- fix64bit-0.5.tar.gz
- not properly tested
- (7.93 KiB) Downloaded 602 times
-
- fix64bit-0.4.tar.gz
- (7.95 KiB) Downloaded 1724 times
Last edited by shd on Thu Mar 22, 2018 11:32 pm, edited 8 times in total.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Nice.
If you get a chance, please post this to the Plugin are of the Docs site:
http://docs.cacti.net/plugins
http://docs.cacti.net/plugins.guidelines
If you get a chance, please post this to the Plugin are of the Docs site:
http://docs.cacti.net/plugins
http://docs.cacti.net/plugins.guidelines
--
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
Live fast, die young
You're sucking up my bandwidth.
J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Fix 64bit counters in Interface Traffic graphs
Yes, this is quite sure. I will go and have a try. I support Howies request to post it as advised.shd wrote:May be this plugin would save a day or two for someone.
R.
Done:Linegod wrote:If you get a chance, please post this to the Plugin are of the Docs site:
http://docs.cacti.net/plugins
http://docs.cacti.net/plugins.guidelines
http://docs.cacti.net/userplugin:fix64bit
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Tried it for a few and get for my windows boxes :
04/15/2010 05:05:04 PM - CMDPHP: Poller[0] Host[13] Description[ZELS2012 - PB] DS[107] Graphs['ZELS2012 - PB - Traffic - 172.21.100.121 (Broadcom NetXtreme Gigabit Ethernet Driver)'] WARNING: Result from SNMP not valid. Partial Result: U
04/15/2010 05:05:04 PM - CMDPHP: Poller[0] Host[13] Description[ZELS2012 - PB] DS[107] Graphs['ZELS2012 - PB - Traffic - 172.21.100.121 (Broadcom NetXtreme Gigabit Ethernet Driver)'] WARNING: Result from SNMP not valid. Partial Result: U
Looked at the poller cache, then tried snmpget :
[root@cacticentos ~]# snmpget -v 2c -c brad1 zels2012.brc.gbl .1.3.6.1.2.1.31.1.1.1.10.16777220
IF-MIB::ifHCOutOctets.16777220 = No Such Object available on this agent at this OID
Any quick way I can fix it and revert back to the old counters ?
Joris.
04/15/2010 05:05:04 PM - CMDPHP: Poller[0] Host[13] Description[ZELS2012 - PB] DS[107] Graphs['ZELS2012 - PB - Traffic - 172.21.100.121 (Broadcom NetXtreme Gigabit Ethernet Driver)'] WARNING: Result from SNMP not valid. Partial Result: U
04/15/2010 05:05:04 PM - CMDPHP: Poller[0] Host[13] Description[ZELS2012 - PB] DS[107] Graphs['ZELS2012 - PB - Traffic - 172.21.100.121 (Broadcom NetXtreme Gigabit Ethernet Driver)'] WARNING: Result from SNMP not valid. Partial Result: U
Looked at the poller cache, then tried snmpget :
[root@cacticentos ~]# snmpget -v 2c -c brad1 zels2012.brc.gbl .1.3.6.1.2.1.31.1.1.1.10.16777220
IF-MIB::ifHCOutOctets.16777220 = No Such Object available on this agent at this OID
Any quick way I can fix it and revert back to the old counters ?
Joris.
Looks like some problem with SNMP on that box.JorisFRST wrote:[root@cacticentos ~]# snmpget -v 2c -c brad1 zels2012.brc.gbl .1.3.6.1.2.1.31.1.1.1.10.16777220
IF-MIB::ifHCOutOctets.16777220 = No Such Object available on this agent at this OID
Just go to settings/misc and set appropriate "SNMP query to search" and "Desired SNMP query".JorisFRST wrote:Any quick way I can fix it and revert back to the old counters ?
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
No and yes. It's windows, you know. No 64 bit counters, you know (at least to my knowledge). If you don't trust me, ask in the windows forum. BSOD2600 knows bettershd wrote:Looks like some problem with SNMP on that box.JorisFRST wrote:[root@cacticentos ~]# snmpget -v 2c -c brad1 zels2012.brc.gbl .1.3.6.1.2.1.31.1.1.1.10.16777220
IF-MIB::ifHCOutOctets.16777220 = No Such Object available on this agent at this OID
R.
Nice Plugin!
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
icon shows up only near graph that complies to "SNMP Query to Search" parameter. for example, it won't show up near the 64bit graphs if you are looking for the ordinary graphs.Sirup wrote:I installed the plugin, enabled it in the plugin managament tab and granted the rights in the user tab. also checked the settings in settings/misc.
but there is no icon showing up next to the graphs?
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
mhm - there is snmpv2 enable for this host..
- Attachments
-
- Unbenannt.jpg (99.47 KiB) Viewed 53457 times
Last edited by Sirup on Thu May 06, 2010 3:02 am, edited 1 time in total.
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0
[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
replace "<?" with "<?php" in script bodies.Sirup wrote:found little "bug". i konw the reason why the plugin is not working here - but maybe there shouldn't be all that code inside the pop up window.
or just make php to be not so strict with script boundaries by editing php.ini
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Code: Select all
short_open_tag = On
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
Who is online
Users browsing this forum: No registered users and 0 guests