[collectd] Need help for filter
Bill Schwanitz
bilsch at gmail.com
Thu Jan 3 15:29:03 CET 2013
On Jan 2, 2013, at 8:29 AM, AUVINET Andre <Andre.AUVINET at nantesmetropole.fr> wrote:
> But I want filter interface ten 0/1 for graph.
> Is it possible to filter interfaces via filter configuration ?
> https://collectd.org/documentation/manpages/collectd.conf.5.shtml#filter_configuration
>
Andre,
Are you wanting to filter such that you just get 10/0/1 stats but not the rest of the switch?
If this is the case I imagine you could modify the snmp configuration a little bit. You would need to look up the port id via the name/descr map.
As an example,
This is one of the interfaces on our nexus ( 5k too ;) )
IF-MIB::ifName.526846912 = STRING: Ethernet104/1/48
The index ( aka interface number ) is 526846912. Side note, the nexus uses freaky high numbers for their interface numbers. The cat switches have more sane numbers ( port 1 is .1, port 2 is .2 etc )
$ grep 526846912 octets.out
IF-MIB::ifInOctets.526846912 = Counter32: 0
I think that if you simply change the config to something like this it would get you what you need. Also note, I think you would set table to false since you are giving a specific oid - play with it and see if I'm right.
<Plugin snmp>
<Data "ifmib_if_octets32_eth104_1_48">
Type "if_octets"
Table false
Instance "IF-MIB::ifDescr.526846912"
Values "IF-MIB::ifInOctets.526846912" "IF-MIB::ifOutOctets.526846912"
</Data>
Also something I found while monitoring our nexus gear. Make sure you use the management hostname/interface to do your polling. The nexus code does some funky prioritization stuff and unless you poll the management ip address of the switch you will get snmp walk timeouts and choppy stats.
Also an interval of 120 to me seems a tad long if you want to use this for trending - 20-30 would be better. I use the default ( 10, iirc ) and it works ok ( you can still run in to poll lags though, so watch your logs ).
Bill
More information about the collectd
mailing list