SNMP traps to telegraf to influxdb

Hi,
I am trying to setup traps from an Ontap box to telegraf, that telegraf sends to influxdb. The idea is to setup the collection of traps like PSU down or disk fail. These are not snmpwalk OID, but only traps that launch when something happens.

Is this possible?

[agent]
interval = “10s”
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = “0s”
flush_interval = “10s”
flush_jitter = “5s”
precision = “s”
debug = false
quiet = false
logfile = “”
hostname = “”
omit_hostname = false

[[outputs.influxdb]]
urls = [“http://:8086"]
database = “storage” # required
retention_policy = “”
write_consistency = “any”
timeout = “5s”
username = "
"
password = "
****”

[[inputs.snmp]]
agents = [ “:161", ":161” ]
timeout = “5s”
retries = 3
version = 2
community = “public”
max_repetitions = 10

name = “netapp”

[[inputs.snmp.field]]
name = “nodeName” #walkable snmp but I do not see anything reaching influxdb
oid = “1.3.6.1.4.1.789.1.25.2.1.1”
[[inputs.snmp.field]]
name = “volumeNearlyFull” #trap
oid = “1.3.6.1.4.1.789.0.85”
[[inputs.snmp.field]]
name = “volumeFull” #trap
oid = “1.3.6.1.4.1.789.0.82”

Unfortunately, we don’t have support for SNMP traps yet in Telegraf. I believe you could use Kapacitor SNMP trap support though.

Could you fill out a feature request on github to create a Telegraf input plugin?

Hi, thanks for the answer. We would like to send traps to Kapacitor, from what I understand the link you send is for Kapacitor to send traps out. Is there a way to send it to Kapacitor?

Oh, you are right, I’m not aware of a way to send them to Kapacitor. Perhaps there is an existing tool but I think we should open a new feature request on Telegraf. Could you do this so you will be attached to the issue if we have more questions?

Hi,
Thanks for the quick replies,

openned https://github.com/influxdata/telegraf/issues/4377