Inputs.snmp_trap file output

[[inputs.snmp_trap]]
  service_address = "udp://:162"
  path = ["/usr/share/snmp/mibs/ericsson/"]

[[outputs.file]]
  data_format = "influx"
  files = ["/tmp/traps.out"]

I have simple snmp_trap config, which writes data into file. From what I see in file there is lots of data from inputs.snmp (I’m collecting this data also) any idea why it is there?

How can write only [[inputs.snmp_trap]] into to the file?

You must also have configured a inputs.snmp somewhere in the configs…

Note that all loaded configs are concatenated as being one single file on startup.

Yes, I have inputs.snmp file also in /telegraf.d/ folder for snmp data. Two separate files

But both loaded in the same telegraf instance? Telegraf sends all metrics to all outputs by default, You need to apply some filtering if you don’t want this.

Yes, it is the same telegraf instance, any example how can do filtering only for inputs.snmp_trap ?

See the basic Metric filtering docs for selectors you can use. For example: namepass = ["snmp_trap"].