Config file with more than one input snmp plugin

Hello,

I need to collect traffic metrics from several interfaces for the same network equipment, example:

Interface 1/1/1
Interface 2/1/1
Interface 3/1/1

Below config file for one interface:

[global_tags]

  [agent]
    interval = "5m"

  [[outputs.influxdb]]
    url = "http://localhost:8086"
    database = "influxdb"

 [[inputs.snmp]]

   agents = [
      "10.10.10.10",
   ]

   version = 2
   community = "public"
   name = "metric"

    [inputs.snmp.tags]
      interface="2/1/11"

    [inputs.snmp.tags]
      description="10/100/Gig Ethernet SFP"

    [[inputs.snmp.field]]
      name = "ifHCInOctets"
      oid = "1.3.6.1.2.1.31.1.1.1.6.69566464"

    [[inputs.snmp.field]]
      name = "ifHCOutOctets"
      oid = "1.3.6.1.2.1.31.1.1.1.10.69566464"

Today I have one config file by interface, that is best way?

Can I have a one only config file for all interfaces?

Hi @paulohperes,

You can have multiple [[inputs.snmp]]

sections in the same configfile ,
On linux you can also use separate .conf files ( in /etc/telegraf/telegraf.d) that will be read when Telegraf starts …
Is that a solution for your problem ?
Best regards