Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Jun 23, 2017 5:32 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 102 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next
Author Message
 Post subject: Fix 64bit counters in Interface Traffic graphs
PostPosted: Wed Feb 17, 2010 2:33 am 
Offline
Cacti User

Joined: Mon Apr 09, 2007 1:33 pm
Posts: 92
Location: Nizhnevartovsk, Russia
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.
Image

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:
Image
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.
Image

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.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


Attachments:
fix64bit-0.4.tar.gz [7.95 KiB]
Downloaded 1032 times

_________________
CentOS 6.7 64-bit, 12Gb RAM, 8xCPU, some virtual datastore. 497 hosts, 161598 datasources, avg polltime 33 sec


Last edited by shd on Tue Mar 11, 2014 1:45 am, edited 6 times in total.
Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 18, 2010 1:05 am 
Offline
Developer
User avatar

Joined: Thu Feb 20, 2003 10:16 am
Posts: 1635
Location: Canada
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

_________________
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca


Top
 Profile  
 
 Post subject: Re: Fix 64bit counters in Interface Traffic graphs
PostPosted: Thu Feb 18, 2010 4:39 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
shd wrote:
May be this plugin would save a day or two for someone.
Yes, this is quite sure. I will go and have a try. I support Howies request to post it as advised.
R.

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 24, 2010 3:04 am 
Offline
Cacti User

Joined: Mon Apr 09, 2007 1:33 pm
Posts: 92
Location: Nizhnevartovsk, Russia
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

Done:
http://docs.cacti.net/userplugin:fix64bit

_________________
CentOS 6.7 64-bit, 12Gb RAM, 8xCPU, some virtual datastore. 497 hosts, 161598 datasources, avg polltime 33 sec


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2010 10:10 am 
Offline
Cacti User
User avatar

Joined: Mon Oct 02, 2006 1:22 pm
Posts: 193
Location: Belgium
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2010 11:19 am 
Offline
Cacti User

Joined: Mon Apr 09, 2007 1:33 pm
Posts: 92
Location: Nizhnevartovsk, Russia
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

Looks like some problem with SNMP on that box.

JorisFRST wrote:
Any quick way I can fix it and revert back to the old counters ?

Just go to settings/misc and set appropriate "SNMP query to search" and "Desired SNMP query".

_________________
CentOS 6.7 64-bit, 12Gb RAM, 8xCPU, some virtual datastore. 497 hosts, 161598 datasources, avg polltime 33 sec


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 15, 2010 1:38 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
shd wrote:
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

Looks like some problem with SNMP on that box.
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 better
R.

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 16, 2010 5:11 am 
Offline
Cacti User
User avatar

Joined: Mon Oct 02, 2006 1:22 pm
Posts: 193
Location: Belgium
Yeah, my own fault with beeing a bit to enthiousast clicking the fix button...
Should have engaged my brain first


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 04, 2010 5:35 am 
Offline

Joined: Tue Apr 13, 2010 9:47 am
Posts: 12
Hello
Do you know if there is a solution for windows.
because 40% of my server are on remote site with non manageable switch, and so i can only monitor network on server interface.

thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 04, 2010 2:47 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
cabsalon wrote:
Hello
Do you know if there is a solution for windows.
because 40% of my server are on remote site with non manageable switch, and so i can only monitor network on server interface.

thanks
Please open a thread in the windows forum. There are the guys that know better ...
R.

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 06, 2010 2:49 am 
Offline
Cacti Moderator
User avatar

Joined: Tue Mar 02, 2010 9:03 am
Posts: 348
Nice Plugin!

_________________
Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

Official Cacti Documentation
Gandalfs Official Debugging Help


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 06, 2010 2:53 am 
Offline
Cacti User

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

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.

_________________
CentOS 6.7 64-bit, 12Gb RAM, 8xCPU, some virtual datastore. 497 hosts, 161598 datasources, avg polltime 33 sec


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 06, 2010 3:00 am 
Offline
Cacti Moderator
User avatar

Joined: Tue Mar 02, 2010 9:03 am
Posts: 348
mhm - there is snmpv2 enable for this host..


Attachments:
Unbenannt.jpg
Unbenannt.jpg [ 99.47 KiB | Viewed 34465 times ]

_________________
Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

Official Cacti Documentation
Gandalfs Official Debugging Help


Last edited by Sirup on Thu May 06, 2010 3:02 am, edited 1 time in total.
Top
 Profile  
 
 Post subject:
PostPosted: Thu May 06, 2010 3:02 am 
Offline
Cacti User

Joined: Mon Apr 09, 2007 1:33 pm
Posts: 92
Location: Nizhnevartovsk, Russia
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.

replace "<?" with "<?php" in script bodies.
or just make php to be not so strict with script boundaries by editing php.ini

_________________
CentOS 6.7 64-bit, 12Gb RAM, 8xCPU, some virtual datastore. 497 hosts, 161598 datasources, avg polltime 33 sec


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 06, 2010 3:04 am 
Offline
Cacti User

Joined: Mon Apr 09, 2007 1:33 pm
Posts: 92
Location: Nizhnevartovsk, Russia
Code:
short_open_tag = On

_________________
CentOS 6.7 64-bit, 12Gb RAM, 8xCPU, some virtual datastore. 497 hosts, 161598 datasources, avg polltime 33 sec


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 102 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group