From 1be8ec48b8734161b9bc4d2ef1fbb1b3201eb1e3 Mon Sep 17 00:00:00 2001 From: Francis Begyn Date: Thu, 21 Mar 2024 11:25:30 +0100 Subject: [PATCH 1/4] add XUPS-MIB to downloads for SNMP generator Signed-off-by: Francis Begyn --- generator/Makefile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/generator/Makefile b/generator/Makefile index b085c402..8e8eb527 100644 --- a/generator/Makefile +++ b/generator/Makefile @@ -59,6 +59,7 @@ INFRAPOWER_URL := https://www.austin-hughes.com/wp-content/uploads/2021/05/IP LIEBERT_URL := https://www.vertiv.com/globalassets/documents/software/monitoring/lgpmib-win_rev16_299461_0.zip READYNAS_URL := https://www.downloads.netgear.com/files/ReadyNAS/READYNAS-MIB.txt READYDATAOS_URL := https://www.circitor.fr/Mibs/Mib/R/READYDATAOS-MIB.mib +XUPS_URL := https://www.circitor.fr/Mibs/Mib/X/XUPS-MIB.mib CYBERPOWER_VERSION := 2.11 CYBERPOWER_URL := https://dl4jz3rbrsfum.cloudfront.net/software/CyberPower_MIB_v$(CYBERPOWER_VERSION).MIB.zip @@ -112,6 +113,7 @@ mibs: \ $(MIBDIR)/apc-powernet-mib \ $(MIBDIR)/readynas \ $(MIBDIR)/readydataos \ + $(MIBDIR)/XUPS-MIB.mib \ $(MIBDIR)/AIRESPACE-REF-MIB \ $(MIBDIR)/AIRESPACE-WIRELESS-MIB \ $(MIBDIR)/ARISTA-ENTITY-SENSOR-MIB \ @@ -367,3 +369,7 @@ $(MIBDIR)/readynas: $(MIBDIR)/readydataos: @echo ">> Downloading readydataos" @curl $(CURL_OPTS) -o $(MIBDIR)/readydataos "$(READYDATAOS_URL)" + +$(MIBDIR)/XUPS-MIB.mib: + @echo ">> Downloading XUPS-MIB.mib" + @curl $(CURL_OPTS) $(CURL_USER_AGENT) -o $(MIBDIR)/XUPS-MIB.mib "$(XUPS_URL)" From 7c271173f860d9c4edb3ab81e80496c1bb58b428 Mon Sep 17 00:00:00 2001 From: Francis Begyn Date: Wed, 8 May 2024 00:45:15 +0200 Subject: [PATCH 2/4] update the XUPS-MIB url to newer version To use the eaton url, we do need to mock a valid user agent. The host seems to check and the "default" agent defined in the Makefile is unsufficient. Signed-off-by: Francis Begyn --- generator/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/Makefile b/generator/Makefile index 8e8eb527..eeed98e8 100644 --- a/generator/Makefile +++ b/generator/Makefile @@ -59,7 +59,7 @@ INFRAPOWER_URL := https://www.austin-hughes.com/wp-content/uploads/2021/05/IP LIEBERT_URL := https://www.vertiv.com/globalassets/documents/software/monitoring/lgpmib-win_rev16_299461_0.zip READYNAS_URL := https://www.downloads.netgear.com/files/ReadyNAS/READYNAS-MIB.txt READYDATAOS_URL := https://www.circitor.fr/Mibs/Mib/R/READYDATAOS-MIB.mib -XUPS_URL := https://www.circitor.fr/Mibs/Mib/X/XUPS-MIB.mib +XUPS_URL := https://www.eaton.com/content/dam/eaton/products/backup-power-ups-surge-it-power-distribution/power-management-software-connectivity/eaton-network-card-ms/eaton-ups-power-mib-release-notes.txt CYBERPOWER_VERSION := 2.11 CYBERPOWER_URL := https://dl4jz3rbrsfum.cloudfront.net/software/CyberPower_MIB_v$(CYBERPOWER_VERSION).MIB.zip @@ -372,4 +372,4 @@ $(MIBDIR)/readydataos: $(MIBDIR)/XUPS-MIB.mib: @echo ">> Downloading XUPS-MIB.mib" - @curl $(CURL_OPTS) $(CURL_USER_AGENT) -o $(MIBDIR)/XUPS-MIB.mib "$(XUPS_URL)" + @curl $(CURL_OPTS) -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0" --compressed -o $(MIBDIR)/XUPS-MIB.mib "$(XUPS_URL)" From 7de8494bed382a9c69da899b91fbcf86f83c4cb0 Mon Sep 17 00:00:00 2001 From: Francis Begyn Date: Wed, 8 May 2024 01:27:00 +0200 Subject: [PATCH 3/4] add the additional Eaton MIBs By upgrading to the new XUPS-MIB from Eaton, it pull in some dependencies that can't be parsed without downloading them as well. By downloading `EATON-OIDS` and `EATON-EMP-MIB` we fullfill the MIB requirements of XUPS-MIB. Signed-off-by: Francis Begyn --- generator/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/generator/Makefile b/generator/Makefile index eeed98e8..65b97199 100644 --- a/generator/Makefile +++ b/generator/Makefile @@ -60,6 +60,8 @@ LIEBERT_URL := https://www.vertiv.com/globalassets/documents/software/moni READYNAS_URL := https://www.downloads.netgear.com/files/ReadyNAS/READYNAS-MIB.txt READYDATAOS_URL := https://www.circitor.fr/Mibs/Mib/R/READYDATAOS-MIB.mib XUPS_URL := https://www.eaton.com/content/dam/eaton/products/backup-power-ups-surge-it-power-distribution/power-management-software-connectivity/eaton-network-card-ms/eaton-ups-power-mib-release-notes.txt +EATON_EMP_MIB_URL := http://m.eaton.com/ecm/groups/public/@pub/@electrical/documents/content/ct_141083.txt +EATON_OIDS_URL := https://www.circitor.fr/Mibs/Mib/E/EATON-OIDS.mib CYBERPOWER_VERSION := 2.11 CYBERPOWER_URL := https://dl4jz3rbrsfum.cloudfront.net/software/CyberPower_MIB_v$(CYBERPOWER_VERSION).MIB.zip @@ -372,4 +374,8 @@ $(MIBDIR)/readydataos: $(MIBDIR)/XUPS-MIB.mib: @echo ">> Downloading XUPS-MIB.mib" - @curl $(CURL_OPTS) -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0" --compressed -o $(MIBDIR)/XUPS-MIB.mib "$(XUPS_URL)" + @curl $(CURL_OPTS) -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0" --compressed -o $(MIBDIR)/XUPS-MIB.mib $(XUPS_URL) + @echo ">> Downloading EATON-EMP-MIB" + @curl $(CURL_OPTS) $(CURL_USER_AGENT) -o $(MIBDIR)/EATON-EMP-MIB $(EATON_EMP_MIB_URL) + @echo ">> Downloading EATON-OIDS" + @curl $(CURL_OPTS) $(CURL_USER_AGENT) -o $(MIBDIR)/EATON-OIDS $(EATON_OIDS_URL) From b869b3263aa4e34d6516b765f8c554e2228d3255 Mon Sep 17 00:00:00 2001 From: Francis Begyn Date: Sat, 13 Jul 2024 01:22:23 +0200 Subject: [PATCH 4/4] add example for XUPS MIB Signed-off-by: Francis Begyn --- generator/generator.yml | 43 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/generator/generator.yml b/generator/generator.yml index 3fd7b424..73fa27fd 100644 --- a/generator/generator.yml +++ b/generator/generator.yml @@ -628,3 +628,46 @@ modules: hrSWInstalled: walk: - hrSWInstalled + +# +# xups +# +# https://www.eaton.com/content/dam/eaton/products/backup-power-ups-surge-it-power-distribution/power-management-software-connectivity/eaton-network-card-ms/eaton-ups-power-mib-release-notes.txt + xups: + max_repetitions: 5 + walk: + - xupsBatCapacity + - xupsBatTimeRemaining + - xupsBatVoltage + - xupsBatCurrent + - xupsEnvAmbientTemp + - xupsInputTable + - xupsInputVoltage + - xupsInputFrequency + - xupsOutputTable + - xupsOutputVoltage + - xupsOutputFrequency + - xupsBypassTable + - xupsBypassFrequency + - xupsBatteryAbmStatus + lookups: + - source_indexes: [xupsInputTable] + lookup: xupsInputVoltage + - source_indexes: [xupsOutputTable] + lookup: xupsOutputVoltage + - source_indexes: [xupsBypassTable] + lookup: xupsBypassFrequency + filters: + static: + - targets: + - xupsBatCapacity + - xupsBatTimeRemaining + - xupsBatVoltage + - xupsBatCurrent + - xupsEnvAmbientTemp + - xupsInputVoltage + - xupsInputFrequency + - xupsOutputVoltage + - xupsOutputFrequency + - xupsBatteryAbmStatus + indices: ["0"]