im using telegraf 1.18.1 to collect SNMP and API time-series metrics from various vendor’s network gear.
usually, i collect both ifTable and ifXTable from my switches.
lately, I’ve encountered an issue with cisco CBS switches, when pulling iftables the switches CPU spikes up to 100%, further investigating I’ve discovered that this issue is because for some reason these switches OS add all L2 configured VLANs to if tables (around 600 VLANs) which make the tables very large.
so now I’m looking for a way to pull only part of the table, let’s say for interfaces 1-52, but i can’t find a scalable way to do so.
I understand that I can pull specific fields (error, hcOctats,
discard,ifstate etc.) and do so for specific interfaces but this will
make the configuration log and complex.
using input filters won’t help either, this way will only filter the data
collected by telegraf and still load
is there a way that:
I could pull the tables but only for specific interfaces?
or just configure the specific table fields for interfaces index range
I don’t think there’s a way to do what you’re looking for. Looking at the Telegraf code that does the snmp walk I don’t see anything that exits early if an index range is complete. I also don’t see a way to start the walk in the middle of the table, for instance if you wanted to fetch [53-104].
Have you used other snmp tools that allow you to walk only a section of the table? If this is possible with snmp, we might be able to add it to telegraf but it would require a code change.