Skip to content

Commit

Permalink
Patch MIBs to import DisplayString from SNMPv2-TC instead of RFC1213-…
Browse files Browse the repository at this point in the history
…MIB (prometheus#868)

Fixes prometheus#867

Signed-off-by: Brian Candler <[email protected]>
Signed-off-by: Stephan Windischmann <[email protected]>
  • Loading branch information
candlerb authored and Stephan Windischmann committed Oct 27, 2023
1 parent 360608e commit 367b490
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ mibs: \
$(MIBDIR)/apc-powernet-mib:
@echo ">> Downloading apc-powernet-mib"
@curl $(CURL_OPTS) -o $(MIBDIR)/apc-powernet-mib "$(APC_URL)"
# Workaround to make DisplayString available (#867)
@sed -i.bak -E 's/(DisplayString[[:space:]]*FROM )RFC1213-MIB/\1SNMPv2-TC/' $(MIBDIR)/apc-powernet-mib
@rm $(MIBDIR)/apc-powernet-mib.bak

$(MIBDIR)/ARISTA-ENTITY-SENSOR-MIB:
@echo ">> Downloading ARISTA-ENTITY-SENSOR-MIB"
Expand Down Expand Up @@ -313,4 +316,7 @@ $(MIBDIR)/CyberPower.MIB:
@curl $(CURL_OPTS) -o $(TMP) $(CYBERPOWER_URL)
@unzip -j -d $(MIBDIR) $(TMP) CyberPower_MIB_v$(CYBERPOWER_VERSION).MIB
@mv -v $(MIBDIR)/CyberPower_MIB_v$(CYBERPOWER_VERSION).MIB $@
# Workaround to make DisplayString available (#867)
@sed -i.bak -E 's/(DisplayString[[:space:]]*FROM )RFC1213-MIB/\1SNMPv2-TC/' $@
@rm $@.bak
@rm -v $(TMP)

0 comments on commit 367b490

Please sign in to comment.