I’m trying to create a table of the next OID “184.108.40.206.4.1.21220.127.116.11.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.2118.104.22.168.22.214.171.124 = Gauge32: 269
SNMPv2-SMI::enterprises.21126.96.36.199.188.8.131.52 = Gauge32: 256
SNMPv2-SMI::enterprises.21184.108.40.206.220.127.116.11 = Gauge32: 0
So in Telegraf the config I added is:
## oid = "SNMPv2-SMI::enterprises.2118.104.22.168.3.1.4"
name = "breakerCurrent"
oid = "SNMPv2-SMI::enterprises.2122.214.171.124.126.96.36.199"
name = "current1"
oid = "SNMPv2-SMI::enterprises.21188.8.131.52.184.108.40.206"
name = "current2"
oid = "SNMPv2-SMI::enterprises.21220.127.116.11.18.104.22.168"
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?
If you look at the mibs, you will see that pduBreakerTable (.22.214.171.124.4.1.21126.96.36.199.3) is the table and pduBreakerCurrent (.188.8.131.52.4.1.21184.108.40.206.3.1.4) is a field.
So I would do something like this:
name = "breaker"
oid = ".220.127.116.11.4.1.2118.104.22.168.3.1.2"
name = "name"
is_tag = true
oid = ".22.214.171.124.4.1.21126.96.36.199.3.1.4"
name = "current"
If you have the mibs installed, I would replace the numerical OID with the name, so respectively
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.
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…