prometheus / snmp_exporter

SNMP Exporter for Prometheus
Apache License 2.0
1.65k stars 614 forks source link

make: *** [Makefile:322: mibs/EATON-EPDU-MIB.txt] Error 22 #829

Closed Ampsyy closed 1 year ago

Ampsyy commented 1 year ago

I have tried this on two separate VMs and get the same issue.

Host operating system: output of uname -a

Linux 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux and Linux 5.15.0-1009-oracle #12-Ubuntu SMP Thu Jun 2 11:44:19 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

snmp_exporter version: output of snmp_exporter -version

Not running yet

What device/snmpwalk OID are you using?

NA

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

NA

What did you do that produced an error?

git clone https://github.com/prometheus/snmp_exporter.git cd snmp_exporter/generator/ make mibs

What did you expect to see?

Complete without any errors

What did you see instead?

Downloading apc-powernet-mib Downloading Cisco AIRESPACE-REF-MIB Downloading Cisco AIRESPACE-WIRELESS-MIB Downloading ARISTA-ENTITY-SENSOR-MIB Downloading ARISTA-SMI-MIB Downloading ARISTA-SW-IP-FORWARDING-MIB Downloading Cisco ENTITY-MIB Downloading Cisco ENTITY-SENSOR-MIB Downloading Cisco ENTITY-STATE-MIB Downloading Cisco ENTITY-STATE-TC-MIB Downloading IANA charset MIB Downloading IANA ifType MIB Downloading IANA printer MIB Downloading Cisco ISDN-MIB Downloading KEEPALIVED-MIB Downloading VRRP-MIB Downloading VRRPv3-MIB Downloading MIKROTIK-MIB Downloading PICO-IPSEC-FLOW-MONITOR-MIB.txt Downloading PICO-SMI-ID-MIB.txt Downloading PICO-SMI-MIB.txt Downloading Printer MIB v2 Downloading servertech-sentry3-mib Downloading servertech-sentry4-mib Downloading UBNT-UniFi-MIB Downloading UBNT-AirFiber-MIB Downloading ubnt-airos to /tmp/tmp.THyGtN0LTW Archive: /tmp/tmp.THyGtN0LTW inflating: mibs/UBNT-AirMAX-MIB.txt removed '/tmp/tmp.THyGtN0LTW' Downloading WIENER-CRATE-MIB to /tmp/tmp.ENkbrxuZ4n Archive: /tmp/tmp.ENkbrxuZ4n inflating: mibs/WIENER-CRATE-MIB-5704.txt removed '/tmp/tmp.ENkbrxuZ4n' Downloading PDU-MIB Downloading Infrapower-MIB.mib to /tmp/tmp.1MhdafjAK9 Archive: /tmp/tmp.1MhdafjAK9 inflating: mibs/IPD-03-S-MIB_Q320V1.mib renamed 'mibs/IPD-03-S-MIB_Q320V1.mib' -> 'mibs/Infrapower-MIB.mib' removed '/tmp/tmp.1MhdafjAK9' Downloading LIEBERT_GP_PDU.MIB to /tmp/tmp.XdEfuPPoPe Archive: /tmp/tmp.XdEfuPPoPe inflating: mibs/LIEBERT_GP_PDU.MIB inflating: mibs/LIEBERT_GP_REG.MIB removed '/tmp/tmp.XdEfuPPoPe' Downloading EATON-EPDU-MIB.txt to /tmp/tmp.HMOAAiy3RZ make: *** [Makefile:322: mibs/EATON-EPDU-MIB.txt] Error 22

SuperQ commented 1 year ago

Looks like the Eaton URL is a 404.

SuperQ commented 1 year ago

It looks like the MIBs are only bundled with a firmware download now: https://www.eaton.com/content/dam/eaton/products/backup-power-ups-surge-it-power-distribution/Firmware/eaton-pdu-g3-firmware-mib.zip. So it's a zip in a zip.

Ampsyy commented 1 year ago

Thanks, I've downloaded those and added into the mibs folder.

I've then built the image sudo docker build -t snmp-generator .

But now get this error when running it to generate the file. sudo docker run --rm -ti -v "${PWD}:/opt/" snmp-generator generate ts=2022-12-22T15:40:19.442Z caller=net_snmp.go:161 level=info msg="Loading MIBs" from=mibs ts=2022-12-22T15:40:19.712Z caller=main.go:119 level=warn msg="NetSNMP reported parse error(s)" errors=43 ts=2022-12-22T15:40:20.017Z caller=tree.go:83 level=warn msg="Can't find augmenting node" augments=snmpTargetAddrEntry node=snmpTargetAddrExtEntry ts=2022-12-22T15:40:20.023Z caller=main.go:51 level=info msg="Generating config for module" module=if_mib ts=2022-12-22T15:40:20.111Z caller=main.go:66 level=info msg="Generated metrics" module=if_mib metrics=40 ts=2022-12-22T15:40:20.111Z caller=main.go:51 level=info msg="Generating config for module" module=cisco_wlc ts=2022-12-22T15:40:20.226Z caller=main.go:129 level=error msg="Error generating config netsnmp" err="cannot find oid '1.3.6.1.4.1.14179.2.1.1.1.38' to walk"

SuperQ commented 1 year ago

Yea, that seems to be another problem with the latest Cisco MIBs.

SuperQ commented 1 year ago

It looks like https://github.com/cisco/cisco-mibs/pull/12 broke things.

SuperQ commented 1 year ago

Fixed with https://github.com/prometheus/snmp_exporter/pull/843