Issue with generator for SNMP exporter

101 views
Skip to first unread message

Denis Trunov

unread,
May 18, 2020, 1:45:00 PM5/18/20
to Prometheus Users
Hi,
I have as issue with generating snmp.yml file with generator:
MIBbrower from ireasoning.com can see all requester information from loaded MIBs with no problem:
snmp-browser-vega.PNG
If I try to make very basic generator.yml file

modules:
  snell:
    walk:
      - 1.3.6.1.4.1.6419.1.1.2.10.74 # controllerName

    version: 2
    auth:
      community: public

and try to generate snmp.yml file with generator I get error message that it can not find OID:

./generator --log.level=debug generate
./mibs/vega
level=info ts=2020-05-18T17:40:03.815Z caller=net_snmp.go:142 msg="Loading MIBs" from=./mibs/vega
level=warn ts=2020-05-18T17:40:03.823Z caller=main.go:120 msg="NetSNMP reported parse error(s)" errors=584
level=info ts=2020-05-18T17:40:03.824Z caller=main.go:52 msg="Generating config for module" module=snell
level=error ts=2020-05-18T17:40:03.824Z caller=main.go:130 msg="Error generating config netsnmp" err="cannot find oid '1.3.6.1.4.1.6419.1.1.2.10.74' to walk"
Makefile:5: recipe for target 'generate' failed
make: *** [generate] Error 1

All required files are available for the generator.

Brian Brazil

unread,
May 18, 2020, 2:07:01 PM5/18/20
to Denis Trunov, Prometheus Users
The error would indicate otherwise, and that's also quite a few parse errors. Make sure all your MIBs are present in that directory. 

--

Ben Kochie

unread,
May 18, 2020, 2:09:08 PM5/18/20
to Denis Trunov, Prometheus Users
You're getting 584 NetSNMP parse errors, there's a generator parse error output option that will probably tell you what's up.

--
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/ceaceaac-05f7-4bad-9c47-2ff44ceac182%40googlegroups.com.

Denis Trunov

unread,
May 18, 2020, 2:12:46 PM5/18/20
to Prometheus Users
Files are 100% where:
 ls -al ./mibs/vega/
total 300
drwxrwxr-x 2 bmd bmd   4096 May 18 18:37 .
drwxrwxr-x 6 bmd bmd 131072 May 18 18:37 ..
-rw-rw-r-- 1 bmd bmd   4931 Nov 19  2018 Alarm.mib
-rw-rw-r-- 1 bmd bmd   4431 Nov 19  2018 CentraController.mib
-rw-rw-r-- 1 bmd bmd  16486 Nov 19  2018 Config2450Device.mib
-rw-rw-r-- 1 bmd bmd   6179 Nov 19  2018 Control2450Device.mib
-rw-rw-r-- 1 bmd bmd  68510 Nov 19  2018 LocalRouter.mib
-rw-rw-r-- 1 bmd bmd   1513 Nov 19  2018 PROBEL-COMMON.mib
-rw-rw-r-- 1 bmd bmd  46748 Nov 19  2018 RouterDevice.mib



понедельник, 18 мая 2020 г., 21:07:01 UTC+3 пользователь Brian Brazil написал:

Denis Trunov

unread,
May 18, 2020, 2:38:24 PM5/18/20
to Prometheus Users
Oh, parse_errors key occurs to be very useful! :)
I get many errors like
{ (is a reserved word): At line 25 in ./mibs/vega/CentraController.mib
2 (is a reserved word): At line 25 in ./mibs/vega/CentraController.mib
Expected "(" (_): At line 91 in ./mibs/vega/CentraController.mib
Seems to be that manufacturer's MIB have a lot of errors. MIBbrowser maybe more errors tolerant. But I even can not imagine what to do with this. :(


понедельник, 18 мая 2020 г., 21:09:08 UTC+3 пользователь Ben Kochie написал:
You're getting 584 NetSNMP parse errors, there's a generator parse error output option that will probably tell you what's up.

To unsubscribe from this group and stop receiving emails from it, send an email to promethe...@googlegroups.com.

Ben Kochie

unread,
May 18, 2020, 3:01:07 PM5/18/20
to Denis Trunov, Prometheus Users
Without a copy of the mibs to debug, it's hard to say what's wrong. Are these MIBs available publicly?

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/8e9028a7-039e-4512-9eb6-9f39c706b1bd%40googlegroups.com.

Denis Trunov

unread,
May 18, 2020, 3:08:40 PM5/18/20
to Prometheus Users
I'm not sure. Suppose that they are under NDA. I'm trying to fix'em. Partly successfully. :) Thank you for your hint about parse_errors key. It really helped me.

понедельник, 18 мая 2020 г., 22:01:07 UTC+3 пользователь Ben Kochie написал:
Without a copy of the mibs to debug, it's hard to say what's wrong. Are these MIBs available publicly?

Reply all
Reply to author
Forward
0 new messages