snmp_exporter generator cannot find oid

278 views
Skip to first unread message

Mark Lyck

unread,
Jul 11, 2019, 5:00:24 PM7/11/19
to Prometheus Users

Hey - I've been having an issue with the generator. I have setup one that works for a similar MIB, but for some reason when I set up a very similar one for the same vendor the generator fails the walk. I double checked the OIDs and they seem to be correct.


Host operating system: output of uname -a


Darwin (MacOS Mojave) Darwin Kernel Version 19.0.0


What device/snmpwalk OID are you using?

Device: Microhard-BulletPlusAC-CAT9


OIDs:

- 1.3.6.1.2.1.1.3 # UPTIME
- 1.3.6.1.4.1.21703.9000.5.4.6.0 # CORETEMP


If this is a new device, please link to the MIB(s).

MIB: https://file.io/TM6YU9


What did you do that produced an error?

  1. Installed the generator per instructions:
  2. Added the target MIB file to /mibs directory
  3. Configured generator.yml accordingly with proper OIDs
  4. Ran the generator both locally and through Docker

What did you expect to see?

Successful walk on the MIB's OIDs.


Example:

INFO[0000] Loading MIBs from mibs                        source="net_snmp.go:141"
WARN[0000] NetSNMP reported 7 parse error(s)             source="main.go:104"
INFO[0000] Generating config for module bullet_plus_gps  source="main.go:49"
INFO[0000] Generated 6 metrics for module bullet_plus_gps  source="main.go:60"
INFO[0000] Config written to /opt/snmp.yml               source="main.go:85"


What did you see instead?

Example:

INFO[0000] Loading MIBs from $HOME/.snmp/mibs:/usr/local/share/snmp/mibs:/usr/share/snmp/mibs  source="net_snmp.go:141"
INFO[0000] Generating config for module bullet_plus_ac_cat9  source="main.go:49"
FATA[0000] Cannot find oid '1.3.6.1.4.1.21703.9000.5.4.16.0' to walk  source="tree.go:290"


This seems to happen with any custom MiB I try to add and run the generator on.

I've tried putting the MiBs in the folders net-snmp would look for them as well like `~/.snmp/mibs` & `/usr/share/snmp/mibs` but no difference.

Mark Lyck

unread,
Jul 11, 2019, 5:02:15 PM7/11/19
to Prometheus Users
Don't seem to be able to edit this. Just wanted to clarify the oid in the error is the same I'm trying to walk. I just copied the error when trying to walk a different OID than CORE TEMP when I was writing this, but they do match.

Brian Brazil

unread,
Jul 11, 2019, 5:22:54 PM7/11/19
to Mark Lyck, Prometheus Users
On Thu, 11 Jul 2019 at 22:00, Mark Lyck <mark...@gmail.com> wrote:

Hey - I've been having an issue with the generator. I have setup one that works for a similar MIB, but for some reason when I set up a very similar one for the same vendor the generator fails the walk. I double checked the OIDs and they seem to be correct.


Host operating system: output of uname -a


Darwin (MacOS Mojave) Darwin Kernel Version 19.0.0


What device/snmpwalk OID are you using?

Device: Microhard-BulletPlusAC-CAT9


OIDs:

- 1.3.6.1.2.1.1.3 # UPTIME
- 1.3.6.1.4.1.21703.9000.5.4.6.0 # CORETEMP


Try without the trailing .0

Brian
 

If this is a new device, please link to the MIB(s).

MIB: https://file.io/TM6YU9


What did you do that produced an error?

  1. Installed the generator per instructions:
  2. Added the target MIB file to /mibs directory
  3. Configured generator.yml accordingly with proper OIDs
  4. Ran the generator both locally and through Docker

What did you expect to see?

Successful walk on the MIB's OIDs.


Example:

INFO[0000] Loading MIBs from mibs                        source="net_snmp.go:141"
WARN[0000] NetSNMP reported 7 parse error(s)             source="main.go:104"
INFO[0000] Generating config for module bullet_plus_gps  source="main.go:49"
INFO[0000] Generated 6 metrics for module bullet_plus_gps  source="main.go:60"
INFO[0000] Config written to /opt/snmp.yml               source="main.go:85"


What did you see instead?

Example:

INFO[0000] Loading MIBs from $HOME/.snmp/mibs:/usr/local/share/snmp/mibs:/usr/share/snmp/mibs  source="net_snmp.go:141"
INFO[0000] Generating config for module bullet_plus_ac_cat9  source="main.go:49"
FATA[0000] Cannot find oid '1.3.6.1.4.1.21703.9000.5.4.16.0' to walk  source="tree.go:290"


This seems to happen with any custom MiB I try to add and run the generator on.

I've tried putting the MiBs in the folders net-snmp would look for them as well like `~/.snmp/mibs` & `/usr/share/snmp/mibs` but no difference.

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/248a7fa9-0559-4828-b664-85f698ebfb64%40googlegroups.com.


--

Mark Lyck

unread,
Jul 11, 2019, 5:30:09 PM7/11/19
to Prometheus Users
that's not the problem. Tried both with and without 0's
To unsubscribe from this group and stop receiving emails from it, send an email to promethe...@googlegroups.com.

Brian Brazil

unread,
Jul 11, 2019, 5:35:04 PM7/11/19
to Mark Lyck, Prometheus Users
On Thu, 11 Jul 2019 at 22:30, Mark Lyck <mark...@gmail.com> wrote:
that's not the problem. Tried both with and without 0's

The link to your MIB isn't working, and Google isn't returning any results for that OID so that's not promising.

Brian
 
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/1b3aa648-605e-47e6-b864-67cadc088b7b%40googlegroups.com.


--

Mark Lyck

unread,
Jul 11, 2019, 5:43:31 PM7/11/19
to Prometheus Users
attached the MIB file here.
Microhard-BulletplusAC-CAT9.MIB

Brian Brazil

unread,
Jul 11, 2019, 5:51:18 PM7/11/19
to Mark Lyck, Prometheus Users
On Thu, 11 Jul 2019 at 22:43, Mark Lyck <mark...@gmail.com> wrote:
attached the MIB file here.

I'd expect that to work, are you sure the MIB file is being loaded?

Brian
 
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/e59a6579-811b-4612-829f-a5bd03c75107%40googlegroups.com.


--

Mark Lyck

unread,
Jul 11, 2019, 5:54:36 PM7/11/19
to Prometheus Users
Not entirely.

I have the MIB both in the generator/mibs folder
~/.snmp/mibs folder
/use/share/snmp/mibs folder

And I checked the directories my net-snmp should read from, and it lists both of the other directories.

But I haven’t found a way to fully confirm that it’s loaded. Do you know how I could check that?

Thanks,
Mark

Brian Brazil

unread,
Jul 11, 2019, 5:56:13 PM7/11/19
to Mark Lyck, Prometheus Users
On Thu, 11 Jul 2019 at 22:54, Mark Lyck <mark...@gmail.com> wrote:
Not entirely.

I have the MIB both in the generator/mibs folder
~/.snmp/mibs folder
/use/share/snmp/mibs folder

And I checked the directories my net-snmp should read from, and it lists both of the other directories.

But I haven’t found a way to fully confirm that it’s loaded. Do you know how I could check that?

The generator's dump command will let you see what can be walked.

Brian
 
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/74d6e1b2-ccb8-491d-9553-6b64d83cf185%40googlegroups.com.


--

Mark Lyck

unread,
Jul 11, 2019, 6:06:57 PM7/11/19
to Prometheus Users
Thanks Brian, this narrows it down!

The MiB I'm trying to walk is indeed NOT in this dump. But the other almost identical MiB for a different microhard device is.

Any idea why my MiB isn't being loaded into the generator?

Brian Brazil

unread,
Jul 11, 2019, 6:37:03 PM7/11/19
to Mark Lyck, Prometheus Users
On Thu, 11 Jul 2019 at 23:07, Mark Lyck <mark...@gmail.com> wrote:
Thanks Brian, this narrows it down!

The MiB I'm trying to walk is indeed NOT in this dump. But the other almost identical MiB for a different microhard device is.

Any idea why my MiB isn't being loaded into the generator?

That's more a netsnmp question, check the parse_errors.

Brian
 
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/3978b579-f6de-4d25-9811-bc92f78490d2%40googlegroups.com.


--

Mark Lyck

unread,
Jul 11, 2019, 6:52:48 PM7/11/19
to Prometheus Users
Figured it out! :)

It turns out the MIB file for this device was TOO similar to the other device... They used the exact same MIB name inside the MIB file... So there was a naming conflict.

Changed the names to be more specific to the device and it works.
Reply all
Reply to author
Forward
0 new messages