Generator error: "cannot find oid"

131 views
Skip to first unread message

Linkoid01

unread,
Jul 16, 2020, 3:08:39 AM7/16/20
to Prometheus Users
Good day,

I am having issues to generate the snmp.yml file using the generator for a private MIB from AVTech Room Alert 32E device.
The MIB file has been copied over and I am able to use it using snmpwalk.


Please see below generator error. Please note that I have tried multiple oid found with ManageEngine MIB Browser by opening the MIB file in question.
./generator generate
level=info ts=2020-07-16T06:55:09.662Z caller=net_snmp.go:142 msg="Loading MIBs" from=$HOME/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
level=warn ts=2020-07-16T06:55:09.821Z caller=main.go:120 msg="NetSNMP reported parse error(s)" errors=1
level=info ts=2020-07-16T06:55:10.003Z caller=main.go:52 msg="Generating config for module" module=ROOMALERT32E-MIB
level=error ts=2020-07-16T06:55:10.047Z caller=main.go:130 msg="Error generating config netsnmp" err="cannot find oid '.1.3.6.1.4.1.20916.1.8.1.2.1.1' to walk"

 However when I perform a simple snmpwalk for that specific oid it resolves just fine:

snmpwalk -v 1 -c public 172.18.232.17 .1.3.6.1.4.1.20916.1.8.1.2.1.1
ROOMALERT32E-MIB::digital-sen1-1.0 = INTEGER: 2750

OS is Debian

I am a novice at SNMP so am not sure what am I missing here.
Any advice is greatly appreciated.

Ben Kochie

unread,
Jul 18, 2020, 1:05:17 AM7/18/20
to Linkoid01, Prometheus Users
You forgot to attach your generator config.

--
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/83ad6dbc-0f11-4433-88d5-d53f64e15b61o%40googlegroups.com.

Linkoid01

unread,
Jul 18, 2020, 8:57:20 AM7/18/20
to Prometheus Users
Thanks for that, completely forgot about that.
Here's what I have in the generator.yml file

modules:
# AVTech RoomAlert 32E
  ROOMALERT32E-MIB:
    walk:
# internal
      - .1.3.6.1.4.1.20916.1.8.1.1
    version: 1
    auth:
      comunity: public
    lookups:
      - source_indexes:
        lookup:
      - source_indexes:
        lookup:
    overrides:

Ben Kochie

unread,
Jul 18, 2020, 12:20:41 PM7/18/20
to Linkoid01, Prometheus Users
The leading dot is the problem.

--
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.
Message has been deleted

Linkoid01

unread,
Jul 19, 2020, 2:36:14 AM7/19/20
to Prometheus Users
Thank you very much for your help thus far. However I am still not able to get it to generate.
I removed the leading dot. My generator.yml file looks like this now:

modules:
# AVTech RoomAlert 32E
 ROOMALERT32E-MIB:
    walk:
      - 1.3.6.1.4.1.20916.1.8.1.1.1.1
   version: 1
    auth:
      # Community string is used with SNMP v1 and v2. Defaults to "public".
      community: public
#    lookups:
#      - source_indexes:
#        lookup:
#      - source_indexes:
#        lookup:
#    overrides:


I am getting the following message:
./generator generate
level=info ts=2020-07-19T06:27:33.832Z caller=net_snmp.go:142 msg="Loading MIBs" from=$HOME/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
level=warn ts=2020-07-19T06:27:34.004Z caller=main.go:120 msg="NetSNMP reported parse error(s)" errors=1
level=error ts=2020-07-19T06:27:34.185Z caller=main.go:130 msg="Error generating config netsnmp" err="error parsing yml config: yaml: line 5: did not find expected key"

I removed lookups and there are no indexes mentioned in this MIB for this device.

I can perform snmpwalk on this oid just fine:

snmpwalk -v 1 -c public 172.18.232.17 .1.3.6.1.4.1.20916.1.8.1.1.1.1
ROOMALERT32E-MIB::internal-tempf.0 = INTEGER: 7826

On Sunday, July 19, 2020 at 12:20:41 AM UTC+8, Ben Kochie wrote:
The leading dot is the problem.

On Sat, Jul 18, 2020, 14:57 Linkoid01 <silv...@gmail.com> wrote:
Thanks for that, completely forgot about that.
Here's what I have in the generator.yml file

modules:
# AVTech RoomAlert 32E
  ROOMALERT32E-MIB:
    walk:
# internal
      - .1.3.6.1.4.1.20916.1.8.1.1
    version: 1
    auth:
      comunity: public
    lookups:
      - source_indexes:
        lookup:
      - source_indexes:
        lookup:
    overrides:

--
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 promethe...@googlegroups.com.

Ben Kochie

unread,
Jul 19, 2020, 5:32:55 AM7/19/20
to Linkoid01, Prometheus Users
It's hard to tell from your email, but it's likely an indenting problem with your generator yaml.

This is what I get when I generate for that walk:


On Sun, Jul 19, 2020 at 8:32 AM Linkoid01 <silv...@gmail.com> wrote:
Thank you very much for your help thus far. However I am still not able to get it to generate.
I removed the leading dot. My generator.yml file looks like this now:
modules:
# AVTech RoomAlert 32E
 ROOMALERT32E-MIB:
    walk:
      - 1.3.6.1.4.1.20916.1.8.1.1.1.1
   version: 1
    auth:
      # Community string is used with SNMP v1 and v2. Defaults to "public".
      community: public
#    lookups:
#      - source_indexes:
#        lookup:
#      - source_indexes:
#        lookup:
#    overrides:


I am getting the following message:
./generator generate
level=info ts=2020-07-19T06:27:33.832Z caller=net_snmp.go:142 msg="Loading MIBs" from=$HOME/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
level=warn ts=2020-07-19T06:27:34.004Z caller=main.go:120 msg="NetSNMP reported parse error(s)" errors=1
level=error ts=2020-07-19T06:27:34.185Z caller=main.go:130 msg="Error generating config netsnmp" err="error parsing yml config: yaml: line 5: did not find expected key"

I removed lookups and there are no indexes mentioned in this MIB for this device.

I can perform snmpwalk on this oid just fine:

snmpwalk -v 1 -c public 172.18.232.17 .1.3.6.1.4.1.20916.1.8.1.1.1.1
ROOMALERT32E-MIB::internal-tempf.0 = INTEGER: 7826


Linkoid01

unread,
Jul 19, 2020, 10:07:27 AM7/19/20
to Prometheus Users
You are right, I had one space only on the line with the MIB name. Once I added one more space indent on that line, it generated properly.
Thank you very much for your help with this. Very much appreciated.

Reply all
Reply to author
Forward
0 new messages