Inputs.snmp not executed for different data types

Hi all,

I want to collect some integer data with Telegraf snmp plugin and when I’m using only inputs.snmp.field, is working. But when I want to save these metrics to separated measurement with inputs.snmp.table and inputs.snmp.table.field, Telegraf is not executing these inputs (checked with “telegraf --config /etc/telegraf/telegraf.conf --test --debug”).

snmpwalk -v 2c -c test 10.67.221.133 1.3.6.1.4.1.9148.3.2.1.1.2.0
SNMPv2-SMI::enterprises.9148.3.2.1.1.2.0 = INTEGER: 37

Working Configuration:

[[inputs.snmp]]
  agents = [ "10.67.221.133:161" ]
  timeout = "5s"
  retries = 3
  version = 2
  community = "test"

  [[inputs.snmp.field]]
    name = "apSysMemoryUtil"
    oid = "1.3.6.1.4.1.9148.3.2.1.1.2.0"

Not Working Configuration:

[[inputs.snmp]]
  agents = [ "10.67.221.133:161" ]
  timeout = "5s"
  retries = 3
  version = 2
  community = "test"

  [[inputs.snmp.table]]
    name = "tasbc"

    [[inputs.snmp.table.field]]
      name = "apSysMemoryUtil"
      oid = "1.3.6.1.4.1.9148.3.2.1.1.2.0"

When I try to collect string data, then the inputs.snmp.table and inputs.snmp.table.field configuration is working:

snmpwalk -v 2c -c test 10.67.221.133 1.3.6.1.2.1.1.5
SNMPv2-MIB::sysName.0 = STRING: tasbc01

[[inputs.snmp]]
 agents = [ "10.67.221.133:161" ]
 timeout = "5s"
 retries = 3
 version = 2
 community = "test"

 [[inputs.snmp.table]]
   name = "tasbc"

   [[inputs.snmp.table.field]]
     name = "Hostname"
     oid = "1.3.6.1.2.1.1.5"

Does anybody know if metric data type can influence if Telegraf will execute such snmp inputs ?

@Hipska knows better, but if a snmp field is a field, then you need to use a field. If it is a table, then use a table.

Indeed, the oid you are requesting simply isn’t indexed data and so it cannot be used as a table field. If you want to split your metrics afterwards, You can use one of the built in processors.