Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Update Infrapower-MIB (prometheus#818)
Browse files Browse the repository at this point in the history
Use latest ZIP file to update Infrapower-MIB.

Signed-off-by: SuperQ <[email protected]>
  • Loading branch information
SuperQ authored Nov 21, 2022
1 parent 2e88e30 commit a793f8a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion generator/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM golang:latest

RUN apt-get update && \
apt-get install -y libsnmp-dev p7zip-full unzip && \
apt-get install -y libsnmp-dev unzip && \
go install github.com/prometheus/snmp_exporter/generator@latest

WORKDIR "/opt"
Expand Down
12 changes: 7 additions & 5 deletions generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ UBNT_AIRFIBER_URL := https://dl.ubnt.com/firmwares/airfiber5X/v4.1.0/UBNT-MIB.tx
UBNT_DL_URL := https://dl.ubnt-ut.com/snmp
WIENER_URL := https://file.wiener-d.com/software/net-snmp/WIENER-CRATE-MIB-5704.zip
RARITAN_URL := https://cdn.raritan.com/download/PX/v1.5.20/PDU-MIB.txt
INFRAPOWER_URL := https://www.austin-hughes.com/support/software/infrapower/IPD-MIB.7z
INFRAPOWER_URL := https://www.austin-hughes.com/wp-content/uploads/2021/05/IPD-03-S-MIB.zip
LIEBERT_URL := https://www.vertiv.com/globalassets/documents/software/monitoring/lgpmib-win_rev16_299461_0.zip
EATON_URL := https://powerquality.eaton.com/Support/Software-Drivers/Downloads/ePDU/EATON-EPDU-MIB.zip
EATON_OIDS_URL := https://raw.githubusercontent.com/librenms/librenms/master/mibs/eaton/EATON-OIDS
Expand Down Expand Up @@ -122,7 +122,7 @@ mibs: mib-dir \
$(MIBDIR)/UBNT-AirMAX-MIB.txt \
$(MIBDIR)/WIENER-CRATE-MIB-5704.txt \
$(MIBDIR)/PDU-MIB.txt \
$(MIBDIR)/IPD-MIB_Q419V9.mib \
$(MIBDIR)/Infrapower-MIB.mib \
$(MIBDIR)/LIEBERT_GP_PDU.MIB \
$(MIBDIR)/EATON-EPDU-MIB.txt \
$(MIBDIR)/EATON-SENSOR-MIB.txt \
Expand Down Expand Up @@ -296,11 +296,13 @@ $(MIBDIR)/PDU-MIB.txt:
@echo ">> Downloading PDU-MIB"
@curl $(CURL_OPTS) -o $(MIBDIR)/PDU-MIB.txt "$(RARITAN_URL)"

$(MIBDIR)/IPD-MIB_Q419V9.mib:
$(MIBDIR)/Infrapower-MIB.mib:
$(eval TMP := $(shell mktemp))
@echo ">> Downloading IPD-MIB_Q419V9 to $(TMP)"
@echo ">> Downloading Infrapower-MIB.mib to $(TMP)"
@rm -vf $(MIBDIR)/IPD-MIB_Q419V9.mib
@curl $(CURL_OPTS) -L -o $(TMP) $(INFRAPOWER_URL)
@7z e -o$(MIBDIR) $(TMP)
@unzip -j -d $(MIBDIR) $(TMP) IPD-03-S-MIB_Q320V1.mib
@mv -v $(MIBDIR)/IPD-03-S-MIB_Q320V1.mib $(MIBDIR)/Infrapower-MIB.mib
@rm -v $(TMP)

$(MIBDIR)/LIEBERT_GP_PDU.MIB:
Expand Down
2 changes: 1 addition & 1 deletion generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Due to the dynamic dependency on NetSNMP, you must build the generator yourself.

```
# Debian-based distributions.
sudo apt-get install unzip build-essential libsnmp-dev p7zip-full # Debian-based distros
sudo apt-get install unzip build-essential libsnmp-dev # Debian-based distros
# Redhat-based distributions.
sudo yum install gcc gcc-g++ make net-snmp net-snmp-utils net-snmp-libs net-snmp-devel # RHEL-based distros
Expand Down
2 changes: 1 addition & 1 deletion generator/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ modules:

# InfraPower PDU's
#
# https://www.austin-hughes.com/support/software/infrapower/IPD-MIB.7z
# https://www.austin-hughes.com/wp-content/uploads/2021/05/IPD-03-S-MIB.zip
# The circuit table in the infrapower MIB is invalid as it has a table (circuitTable) nested inside another table (pduTable), and this invalid setup then confuses the generator.
infrapower_pdu:
walk:
Expand Down

0 comments on commit a793f8a

Please sign in to comment.