How to Collect only couple of Fields from a table Telegraf snmp configuration

Hi There,

I am new to influx and telegraf. I am trying to configure telegraf to collect stats from cisco switch.

Current configuration --> Works

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

[[inputs.snmp.table.field]]
name = “ifName”
oid = “IF-MIB::ifName”

Below is the output
interface,agent_host=switch1 ,host=server99 ifName=“fc1/10”,ifInMulticastPkts=0i,ifHCOutUcastPkts=0i,ifConnectorPresent=1i,ifCounterDiscontinuityTime=0i,ifHCInUcastPkts=0i,ifHCInBroadcastPkts=0i,ifHCOutBroadcastPkts=0i,ifPromiscuousMode=2i,ifInBroadcastPkts=0i,ifHCInOctets=24178500939i,ifHCOutOctets=34331953187i,ifHighSpeed=16000i,ifAlias=“Storage_port1”,ifOutMulticastPkts=0i,ifOutBroadcastPkts=0i,ifHCInMulticastPkts=0i,ifHCOutMulticastPkts=0i,ifLinkUpDownTrapEnable=1i 1525669042000000000

But I only need few metrics not all from the table
ifName
ifHCInOctets
ifHCOutOctets
ifAlias
ifHighSpeed

Is it possible to use [[inputs.snmp.table]] and only capture the required metrics ?
is it possible to use [[inputs.snmp.field]] and specify multiple metrics ?

[[inputs.snmp.table.field]]
name = “interface”
oid = "IF-MIB::ifHCOutOctets, "IF-MIB::ifHCInOctets “”

If i collect them individually as following

[[inputs.snmp.table.field]]
name = “interface”
oid = “IF-MIB::ifName”
is_tag = true

[[inputs.snmp.table.field]]
name = “bytesIn”
oid = “IF-MIB::ifHCInOctets”

[[inputs.snmp.table.field]]
name = “bytesOut”
oid = “IF-MIB::ifHCOutOctets”

how do link them when i am graphing using grafana

Thank You

There was a post about this recently.

Thanks Daniel I will try that