# Telegraf SNMP table(?) OID error

**URL:** <https://community.influxdata.com/t/telegraf-snmp-table-oid-error/30011>\
**Category:** Telegraf\
**Tags:** telegraf, snmp\
**Created:** [May 19, 2023, 8:01pm UTC](https://community.influxdata.com/t/telegraf-snmp-table-oid-error/30011 "2023-05-19T20:01:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![avazquez](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/avazquez/32/13490_2.png) [@avazquez](https://community.influxdata.com/u/avazquez)\
**Post date:** [May 19, 2023, 8:01pm UTC](https://community.influxdata.com/t/telegraf-snmp-table-oid-error/30011/1 "2023-05-19T20:01:20Z")

</div>

I’m trying to create a table of the next OID “1.3.6.1.4.1.21239.5.2.3.3.1.4” if I do a snmpwalk what I get is the next 3 rows. If Im right, that means this OID is a table.

SNMPv2-SMI::enterprises.21239.5.2.3.3.1.4.1 = Gauge32: 269  
SNMPv2-SMI::enterprises.21239.5.2.3.3.1.4.2 = Gauge32: 256  
SNMPv2-SMI::enterprises.21239.5.2.3.3.1.4.3 = Gauge32: 0

So in Telegraf the config I added is:

```auto
[[inputs.snmp.table]]
  ## oid = "SNMPv2-SMI::enterprises.21239.5.2.3.3.1.4"
  name = "breakerCurrent"
[[inputs.snmp.table.field]]
    oid = "SNMPv2-SMI::enterprises.21239.5.2.3.3.1.4.1"
   name = "current1"
[[inputs.snmp.table.field]]
   oid = "SNMPv2-SMI::enterprises.21239.5.2.3.3.1.4.2"
   name = "current2"
[[inputs.snmp.table.field]]
    oid = "SNMPv2-SMI::enterprises.21239.5.2.3.3.1.4.3"
    name = "current3"

```

If I uncomment the line with the OID in the table I get an error saying, is this a table? If I remove it, it runs but nothing is saved I tracked this by sending influx data into an output file, its just empty.

What am I doing wrong?

---

<div class="post-metadata">

**Author:** ![Hipska](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/hipska/32/3877_2.png) [@Hipska](https://community.influxdata.com/u/Hipska)\
**Post date:** [May 22, 2023, 7:29am UTC](https://community.influxdata.com/t/telegraf-snmp-table-oid-error/30011/2 "2023-05-22T07:29:22Z")

</div>

If you look at the mibs, you will see that [pduBreakerTable (.1.3.6.1.4.1.21239.5.2.3.3)](https://mibs.observium.org/mib/GEIST-V5-MIB/#pduBreakerTable) is the table and [pduBreakerCurrent (.1.3.6.1.4.1.21239.5.2.3.3.1.4)](https://mibs.observium.org/mib/GEIST-V5-MIB/#pduBreakerCurrent) is a field.

So I would do something like this:

```toml
[[inputs.snmp.table]]
  name = "breaker"
[[inputs.snmp.table.field]]
    oid = ".1.3.6.1.4.1.21239.5.2.3.3.1.2"
    name = "name"
    is_tag = true
[[inputs.snmp.table.field]]
   oid = ".1.3.6.1.4.1.21239.5.2.3.3.1.4"
   name = "current"

```

If you have the mibs installed, I would replace the numerical OID with the name, so respectively `GEIST-V5-MIB::pduBreakerName` and `GEIST-V5-MIB::pduBreakerCurrent`.

---

<div class="post-metadata">

**Author:** ![avazquez](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/avazquez/32/13490_2.png) [@avazquez](https://community.influxdata.com/u/avazquez)\
**Post date:** [May 22, 2023, 3:48pm UTC](https://community.influxdata.com/t/telegraf-snmp-table-oid-error/30011/3 "2023-05-22T15:48:25Z")

</div>

This worked perfectly, I just have some questions for you @Hipska to help me understand.

How did you know which is the table OID? And how did you know there was a name collumn in it? From my understanding you dont have the MIB file.

How do I install the mibs? As you said removing numerical OID would make the file way more readable.

Thanks a lot for the solution, and in advance for the answer of these questions.

---

<div class="post-metadata">

**Author:** ![Hipska](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/hipska/32/3877_2.png) [@Hipska](https://community.influxdata.com/u/Hipska)\
**Post date:** [May 22, 2023, 4:00pm UTC](https://community.influxdata.com/t/telegraf-snmp-table-oid-error/30011/4 "2023-05-22T16:00:16Z")

</div>

How to install MIBs is something specific to your operating system, not related to telegraf.

If you click through on the links, you can see I found the MIB on a website…
