Looking to collect a subset of the interfaces of a LAN Switch

Dear team:
I want Telegraf to collect the information associated to 2 (two) interfaces of a Cisco LAN switch and store it in my influxDB repository.

The following sentences (please see below) will provide me with the entire table of the interfaces in the device. ¿ is there any way in which I could store in influxDB only the information of the interfaces in which I am interested?

Ideally, I would like Telegraf to query the device just for the interfaces I am interested in. But worst case, if I have to retrieve the entire table, then I would like to get rid of the information I do not need.

Any hints will be greatly appreciated.
Best regards
Rogelio

SECTION OF MY CONFIGURATION FILE

[[inputs.snmp.table]]
** name = “interface”**
** oid = “IF-MIB::ifXTable”**
** index_as_tag=true**


** [[inputs.snmp.table.field]]**
** oid = “IF-MIB::ifAlias”**
** is_tag = true**

Someone else in the past was looking to solve the same request:

I will take a look at this and see if I can work the idea out.
Thanks!

I found a way!
Filtering can be carried out with tagpass, namepass, fieldpass, tagdrop, and some other keywords.
In my case, I used the tagpass filter, and was able to collect exactly what I needed.
Thanks!

1 Like

Hello @Rogelio_Alvez
Thank you so much for sharing your solution with the community!