Fix 64bit counters in Interface Traffic graphs

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

You are just posting to fast...^^

I'll try your solution - but SNMPv2 is enabled on the device.
[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]
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

works with this solution - thanks
[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]
shd
Cacti User
Posts: 96
Joined: Mon Apr 09, 2007 1:33 pm
Location: Nizhnevartovsk, Russia

Post by shd »

Sirup wrote:works with this solution - thanks
replaced short tags with long tags and uploaded new version with other small changes.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
tvirath
Cacti User
Posts: 60
Joined: Thu Nov 20, 2008 9:38 am

Unable to see the 64bit Fix Icon

Post by tvirath »

Hi Guys,

I have installed the fix64bit plugin but unable to see the fix64bit Icon next to the graph. Does anyone know what is the issue?
shd
Cacti User
Posts: 96
Joined: Mon Apr 09, 2007 1:33 pm
Location: Nizhnevartovsk, Russia

Re: Unable to see the 64bit Fix Icon

Post by shd »

tvirath wrote: I have installed the fix64bit plugin but unable to see the fix64bit Icon next to the graph. Does anyone know what is the issue?
Did you go to the Misc/Fix 64bit Counters section of settings and checked that all parameters are correct? Show me screenshot of this section, please.

The icon appears only near the graphs that fix64bit can correct. Plugin checks graph type, datasource type and so on for this graph. So it will not be placed near the graphs that are already converted or have some another type.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
fcaen
Posts: 1
Joined: Fri Jul 09, 2010 6:34 pm

Post by fcaen »

shd, you've obviously figured how to make all the necessary changes required to convert graphs from 32 to 64 bits counters. How hard would it be for you to write a script that makes the change globally to ALL 32-bit counter interface graphs?

Searching through the forums tells me many other people have needed this for years. Many people have hundreds or thousands of graphs that need to be converted. Your plugin, as awesome as it is, is still too slow of a process to do that.

What do you think?

And thank you for what you've contributed so far. It's not scalable enough for my needs, but it still is a cool plugin.
shd
Cacti User
Posts: 96
Joined: Mon Apr 09, 2007 1:33 pm
Location: Nizhnevartovsk, Russia

Post by shd »

fcaen wrote:How hard would it be for you to write a script that makes the change globally to ALL 32-bit counter interface graphs?
I had that thought, but some of my devices do not work with snmpv2 or work with snmpv2, but do not have 64 bit interface counters. So it would be a lot of work to make proper filters for datasources to convert, and I was lazy.

I think I'll do this, but it will require some time.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
stormonts
Cacti User
Posts: 349
Joined: Tue Mar 31, 2009 10:05 am

Re: Fix 64bit counters in Interface Traffic graphs

Post by stormonts »

It should work with "in/out bytes" graphs as well, correct? Since we don't use "In/Out bits", I changed the settings as shown on the screenshot attached and I'm not seeing that icon show up anywhere. Devices I have tried on are set to SNMP 2 and I know that they have 64 bit counters. What did I mess up?
Attachments
fix.png
fix.png (19.86 KiB) Viewed 10734 times
Last edited by stormonts on Thu Oct 07, 2010 10:10 am, edited 1 time in total.
angusma
Posts: 19
Joined: Tue Nov 17, 2009 11:12 pm

Re: Fix 64bit counters in Interface Traffic graphs

Post by angusma »

I'm not able to choose 64bits counters, does this plug-in apply to 95th Percentile template?
Attachments
64.JPG
64.JPG (42.68 KiB) Viewed 10725 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 »

angusma wrote:I'm not able to choose 64bits counters, does this plug-in apply to 95th Percentile template?
By default, 95th percentile template doesn't have version with 64bit counters. Go in Data Queries, choose SNMP - Interface Statistics. There you will find "In/Out Bits with 95th Percentile" template. Create exactly same template there but with name, for example, "In/Out Bits with 95th Percentile (64-bit Counters)". Choose there ifHCInOctets instead of ifInOctets and ifHCOutOctets instead of ifOutOctets. Be careful to make everything else in your new template completely like "In/Out Bits with 95th Percentile" template. Then you can use fix64bit as usual.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
X-dark
Cacti User
Posts: 111
Joined: Wed Jun 18, 2008 10:21 am
Location: France

Re:

Post by X-dark »

fcaen wrote:shd, you've obviously figured how to make all the necessary changes required to convert graphs from 32 to 64 bits counters. How hard would it be for you to write a script that makes the change globally to ALL 32-bit counter interface graphs?

Searching through the forums tells me many other people have needed this for years. Many people have hundreds or thousands of graphs that need to be converted. Your plugin, as awesome as it is, is still too slow of a process to do that.

What do you think?

And thank you for what you've contributed so far. It's not scalable enough for my needs, but it still is a cool plugin.
I did it with something like this :
PLEASE do not use this if you don't understand what you're doing !!!

Code: Select all

update data_input_data
set value=138
where
value = 71 and 
data_template_data_id in (
        select
        data_template_data.id
        from
        data_template_data
        where
        local_data_id in (
            SELECT
            data_local.id
            from
            graph_tree, graph_tree_items,
            data_local
            join host_snmp_cache on (
                data_local.host_id = host_snmp_cache.host_id and 
                data_local.snmp_query_id = host_snmp_cache.snmp_query_id and 
                data_local.snmp_index = host_snmp_cache.snmp_index
                )   
            where   
            host_snmp_cache.field_name = 'ifSpeed' and
            host_snmp_cache.field_value > '100000000'
            and graph_tree_items.host_id = data_local.host_id
            and graph_tree_items.graph_tree_id = graph_tree.id
            and graph_tree.name like 'Foo' 
            )   
        and data_template_id = 41
        )   
;
This request change the data_input_data for all graph on the network 'Foo' with interfaces having a speed greater than 100Mbits/s. Change the data_input_data values and the data_template_id according to your Cacti settings.

You'll need to create a 64bits data_input_data as explained by shd above first.
Cedric Girard
shd
Cacti User
Posts: 96
Joined: Mon Apr 09, 2007 1:33 pm
Location: Nizhnevartovsk, Russia

Re: Re:

Post by shd »

X-dark wrote:I did it with something like this :
PLEASE do not use this if you don't understand what you're doing !!!

Code: Select all

<!-- cut -->
This request change the data_input_data for all graph on the network 'Foo' with interfaces having a speed greater than 100Mbits/s. Change the data_input_data values and the data_template_id according to your Cacti settings.
You'll need to create a 64bits data_input_data as explained by shd above first.
You've forgot about going through the all rrd files in order to update their rrd_maximum for in and out counters.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
X-dark
Cacti User
Posts: 111
Joined: Wed Jun 18, 2008 10:21 am
Location: France

Re: Re:

Post by X-dark »

shd wrote:You've forgot about going through the all rrd files in order to update their rrd_maximum for in and out counters.
Are you sure it's necessary. What value do you put ?
The default if IfSpeed. It shouldn't matter whether you are using 32 or 64 bits counter. However I haven't been able to find whether the rrd_maximum apply to the value or the ds.

Anyway I did it with only the mysql update and it worked.
Cedric Girard
shd
Cacti User
Posts: 96
Joined: Mon Apr 09, 2007 1:33 pm
Location: Nizhnevartovsk, Russia

Re: Re:

Post by shd »

X-dark wrote:Are you sure it's necessary. What value do you put ?
The default if IfSpeed. It shouldn't matter whether you are using 32 or 64 bits counter. However I haven't been able to find whether the rrd_maximum apply to the value or the ds.

Anyway I did it with only the mysql update and it worked.
I am very glad for you, but if only database update could resolve all our problems, plugin would be unnecessary. Somehow rrd_maximum is not set correctly on every rrd.

Maximum for fix64bit is set at the plugin settings.
CentOS 64-bit, 20Gb RAM, 8xCPU, some virtual datastore. 600+ hosts, 200k+ datasources, avg polltime 45 sec
shd
Cacti User
Posts: 96
Joined: Mon Apr 09, 2007 1:33 pm
Location: Nizhnevartovsk, Russia

Re: Re:

Post by shd »

Released new version:
--- 0.3 ---
Added mass graph fixing through the “Graph Management” page.
Uninstall and then reinstall plugin to use this functionality.

New version can be downloaded at the plugin page:
http://docs.cacti.net/userplugin:fix64bit

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