Solved: SNMP works with snmpwalk, but not from Telegraf

I have a strange behavior of Telegraf with my SNMP device.
When I try snmpwalk with this specific device, everything looks OK and I get all responses I’m expecting.
But when I try to fetch data from Telegraf, nothing happens. By using tcpdump I see that Telegraf doesn’t even attempt to communicate with device, telegraf test doesn’t produce any output, while telegraf.log seems OK. Pulling data from other SNMP devices works OK.
Here is my telegraf.conf which is cleaned of all other non-related configuration.

  interval = "20s"
  round_interval = true
  metric_batch_size = 1000
  metric_buffer_limit = 10000
  collection_jitter = "1s"
  flush_interval = "10s"
  flush_jitter = "5s"
  precision = "0s"
  quiet = false
  debug = true
  logtarget = "file"
  logfile = "/var/log/telegraf/telegraf.log"

    urls = ["http://influxdb:8086"]

  agents = ["udp://"]
  version = 2
  community = "public"
  name = "snmp"
  timeout = "10s"

  oid = ""
  name = "hostname"
  is_tag = true

I just want to add that whole TIG stack is deployed as containers running on Docker.

What output do you get when running this config with telegraf --test?

Edit: Oh I see the problem, you are not collecting any metric field, only a tag.

Try adding this:

    name = "uptime"
    oid = "DISMAN-EVENT-MIB::sysUpTimeInstance"
    conversion = "float(2)"

thank you very much. I was suspecting that issue might be something so simple, but just failed to find it.
Now I got output from test and I can see my device as query target in DB.
Thanks a lot!


Great, please mark as solved.