SNMP Input plugin - SNmp table creation

Hi!

Is this configuration option, no longer valid?

“By default all columns of the SNMP table will be collected - it is not required to add a nested field for each column, only those which you wish to modify. To only collect certain columns, omit the oid from the table section and only include oid settings in field sections.”

I am runing telegraf 1.40 (it happened also in 1.39.2)
CentOS Linux release 7.9.2009

This is the code I am running:

  [[inputs.snmp.field]]
    # "An administratively-assigned name for this managed\n node. By convention, this is the node\'s fully-qualified\n domain name. If the name is unknown, the value is\n the zero-length string."
    oid = ".1.3.6.1.2.1.1.5.0"
    name = "SNMPv2-MIB::sysName"
    is_tag = true
        
  [[inputs.snmp.table]]
    # " "
    #oid = ".1.3.6.1.4.1.33516.106.4.2"
    name = "JS6000-9132S-MIB::portParaTable"
    inherit_tags = ["SNMPv2-MIB::sysName"] 
    index_as_tag = true


  [[inputs.snmp.table.field]]
    # " "
    oid = ".1.3.6.1.4.1.33516.106.4.2.1.1.0"
    name = "JS6000-9132S-MIB::portIndex"

  [[inputs.snmp.table.field]]
    # "port name.\n\t\t\t\tto identify the port"
    oid = ".1.3.6.1.4.1.33516.106.4.2.1.2.0"
    name = "JS6000-9132S-MIB::portName"

If the table OID is commented the table is not built.
If the table OID is uncommented the table is built but ignored the field names and uses default names.

This worked as doc states when I started using telegraf 1.31.2
I did not need a new table up to now, so I cannot say when really stoped working.

Regards!
Pablo

Shouldn’t the last .0 be omitted from the OID?

Yes!!!

After two years, I completely forgot about that.

I am sure it is stated in some part in documentation but now I cant find it.

Thanks a lot!