NOOB: inputs.snmp only shows sequential integers

Hi,

I have a strange problem with telegraf. I just started setting up a TIG environment on Debian Jessie with the influxdata repositiories. For my first systems collecting data via SNMP just works. But adding the next just gives me this strange behaviour that I only get ever increasing, sequential integers instead of the values.

For example:

> snmp,agent_host=198.51.100.1,host=tig,hostname=146 cpCpu0Idle=155i,cpCpu0Interrupts=163i,cpCpu0Sys=151i,cpCpu0Usage=159i,cpCpu0User=147i,cpCpu1Idle=156i,cpCpu1Interrupts=164i,cpCpu1Sys=152i,cpCpu1Usage=160i,cpCpu1User=148i,cpCpu2Idle=157i,cpCpu2Interrupts=165i,cpCpu2Sys=153i,cpCpu2Usage=161i,cpCpu2User=149i,cpCpu3Idle=158i,cpCpu3Interrupts=166i,cpCpu3Sys=154i,cpCpu3Usage=162i,cpCpu3User=150i 1587974941000000000

Instead of:

RFC1213-MIB::sysName.0 = STRING: "fw-erf-1"

The configuration is as follows:

# Retrieves SNMP values from remote agents
[[inputs.snmp]]
  ## Agent addresses to retrieve values from.
  ##   example: agents = ["udp://127.0.0.1:161"]
  ##            agents = ["tcp://127.0.0.1:161"]
  agents = ["udp://198.51.100.1:161"]

  ## Timeout for each request.
  timeout = "5s"

  ## SNMP version; can be 1, 2, or 3.
  version = 3

  ## SNMP community string.
  # community = "public"

  ## Number of retries to attempt.
  retries = 3

  ## The GETBULK max-repetitions parameter.
  max_repetitions = 10

  ## SNMPv3 authentication and encryption options.
  ##
  ## Security Name.
  sec_name = "redacted"
  ## Authentication protocol; one of "MD5", "SHA", or "".
  auth_protocol = "SHA"
  ## Authentication password.
  auth_password = "redacted"
  ## Security Level; one of "noAuthNoPriv", "authNoPriv", or "authPriv".
  sec_level = "authPriv"
  ## Context Name.
  # context_name = ""
  ## Privacy protocol used for encrypted messages; one of "DES", "AES" or "".
  priv_protocol = "AES"
  ## Privacy password used for encrypted messages.
  priv_password = "redacted"

  [[inputs.snmp.field]]
    name = "hostname"
    oid = "RFC1213-MIB::sysName.0"
    is_tag = true
   
  ## CPU Counter (see sk92402) 
  [[inputs.snmp.field]]
    name = "cpCpu0User"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.2.1.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu1User"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.2.2.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu2User"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.2.3.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu3User"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.2.4.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu0Sys"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.3.1.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu1Sys"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.3.2.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu2Sys"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.3.3.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu3Sys"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.3.4.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu0Idle"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.4.1.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu1Idle"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.4.2.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu2Idle"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.4.3.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu3Idle"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.4.4.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu0Usage"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.5.1.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu1Usage"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.5.2.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu2Usage"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.5.3.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu3Usage"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.5.4.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu0Interrupts"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.7.1.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu1Interrupts"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.7.2.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu2Interrupts"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.7.3.0"
  
  [[inputs.snmp.field]]
    name = "cpCpu3Interrupts"
    oid = "SNMPv2-SMI::enterprises.2620.1.6.7.5.1.7.4.0"

I searched both the internet and the forums but didn’t find any answer but someone at stackoverflow who has had the same problem:

Frank.

Bumping. I’d really appreciate some help. Already tried to monitor from a different system but I get the same results. Changing the agent to a system I know which is working I get the correct results, so I guess my telegraf config is not to blame. Also I don’t think the SNMP settings on the target are to blame as a snmpwalk just works.

Now this is going to be painful: I mixed up my auth and privacy passphrases in the configuration. Fixing that also resolved the issue that telegraf shows an evergrowing integer :frowning:

Going back to be massively ashamed.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.