Skip to content

Commit

Permalink
Import CyberPower MIBs, add cyberpower config. (#797)
Browse files Browse the repository at this point in the history
* Import CyberPower MIBs, add cyberpower module walks.

Signed-off-by: Justin Graham <[email protected]>
  • Loading branch information
jlrgraham committed Dec 10, 2022
1 parent 7dea13b commit 1964bce
Show file tree
Hide file tree
Showing 3 changed files with 2,628 additions and 1 deletion.
13 changes: 12 additions & 1 deletion generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ LIEBERT_URL := https://www.vertiv.com/globalassets/documents/software/moni
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

CYBERPOWER_VERSION := 2.10
CYBERPOWER_URL := https://dl4jz3rbrsfum.cloudfront.net/software/CyberPower_MIB_v$(CYBERPOWER_VERSION).MIB.zip

.DEFAULT: all

.PHONY: all
Expand Down Expand Up @@ -126,7 +129,8 @@ mibs: mib-dir \
$(MIBDIR)/LIEBERT_GP_PDU.MIB \
$(MIBDIR)/EATON-EPDU-MIB.txt \
$(MIBDIR)/EATON-SENSOR-MIB.txt \
$(MIBDIR)/EATON-OIDS.txt
$(MIBDIR)/EATON-OIDS.txt \
$(MIBDIR)/CyberPower.MIB

mib-dir:
@mkdir -p -v $(MIBDIR)
Expand Down Expand Up @@ -323,3 +327,10 @@ $(MIBDIR)/EATON-OIDS.txt:
@echo ">> Downloading EATON-OIDS.txt to $@"
@curl $(CURL_OPTS) -o $@ $(EATON_OIDS_URL)

$(MIBDIR)/CyberPower.MIB:
$(eval TMP := $(shell mktemp))
@echo ">> Downloading CyberPower.MIB to $(TMP)"
@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 $@
@rm -v $(TMP)
10 changes: 10 additions & 0 deletions generator/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -710,3 +710,13 @@ modules:
type: EnumAsInfo
"1.3.6.1.4.1.534.6.6.7.6.1.1.3":
type: DisplayString

# CyberPower
#
# https://www.cyberpowersystems.com/product/software/mib-files/mib-v29/
cyberpower:
version: 1
walk:
- 1.3.6.1.4.1.3808.1.1.1 # ups
- 1.3.6.1.4.1.3808.1.1.4 # environmentSensor
- 1.3.6.1.4.1.3808.1.1.6 # ePDU2
Loading

0 comments on commit 1964bce

Please sign in to comment.