Skip to content

Commit

Permalink
feat: add Raritan PDU2-MIB (#961)
Browse files Browse the repository at this point in the history
Add the Raritan PDU2-MIB.txt file.

Also add to `generator.yml` the querying of the external sensors which
are found on the Raritan Smart Rack Controller

Closes: #834

Signed-off-by: John L. Villalovos <[email protected]>
Co-authored-by: John L. Villalovos <[email protected]>
  • Loading branch information
tchadelicard and jvillal-amp authored Aug 22, 2023
1 parent 6e6b457 commit 2ae8cfa
Show file tree
Hide file tree
Showing 3 changed files with 158 additions and 8 deletions.
8 changes: 7 additions & 1 deletion generator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ UBNT_AIRFIBER_URL := https://dl.ubnt.com/firmwares/airfiber5X/v4.1.0/UBNT-MIB.tx
UBNT_DL_URL := http://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
RARITAN2_URL := https://cdn1.raritan.com/download/src-g2/4.0.20/PDU2_MIB_4.0.20_49038.txt
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

Expand Down Expand Up @@ -124,6 +125,7 @@ mibs: \
$(MIBDIR)/UBNT-AirMAX-MIB.txt \
$(MIBDIR)/WIENER-CRATE-MIB-5704.txt \
$(MIBDIR)/PDU-MIB.txt \
$(MIBDIR)/PDU2-MIB.txt \
$(MIBDIR)/Infrapower-MIB.mib \
$(MIBDIR)/LIEBERT_GP_PDU.MIB \
$(MIBDIR)/CyberPower.MIB
Expand Down Expand Up @@ -293,9 +295,13 @@ $(MIBDIR)/WIENER-CRATE-MIB-5704.txt:
@rm -v $(TMP)

$(MIBDIR)/PDU-MIB.txt:
@echo ">> Downloading PDU-MIB"
@echo ">> Downloading Raritan PDU-MIB"
@curl $(CURL_OPTS) -o $(MIBDIR)/PDU-MIB.txt "$(RARITAN_URL)"

$(MIBDIR)/PDU2-MIB.txt:
@echo ">> Downloading Raritan PDU2-MIB"
@curl $(CURL_OPTS) -o $(MIBDIR)/PDU2-MIB.txt "$(RARITAN2_URL)"

$(MIBDIR)/Infrapower-MIB.mib:
$(eval TMP := $(shell mktemp))
@echo ">> Downloading Infrapower-MIB.mib to $(TMP)"
Expand Down
5 changes: 5 additions & 0 deletions generator/generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,10 @@ modules:
- picoIPv4MIB
- picoIPv6MIB

# Raritan
#
# https://cdn.raritan.com/download/PX/v1.5.20/PDU-MIB.txt
# https://cdn1.raritan.com/download/src-g2/4.0.20/PDU2_MIB_4.0.20_49038.txt
raritan:
walk:
- 1.3.6.1.4.1.13742.4.1.20.2.1.7 # inletCurrent
Expand All @@ -472,6 +476,7 @@ modules:
- 1.3.6.1.4.1.13742.4.1.2.2.1.6 # outletVoltage
- 1.3.6.1.4.1.13742.4.1.2.2.1.7 # outletActivePower
- 1.3.6.1.4.1.13742.4.1.3.1.5 # unitCpuTemp
- 1.3.6.1.4.1.13742.6.5.5.3.1 # externalSensors
lookups:
- source_indexes: [outletIndex]
lookup: outletLabel
Expand Down
153 changes: 146 additions & 7 deletions snmp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19978,7 +19978,6 @@ modules:
6: interlockClosed
raritan:
walk:
- 1.3.6.1.4.1.13742.4.1.2.2.1.2
- 1.3.6.1.4.1.13742.4.1.2.2.1.3
- 1.3.6.1.4.1.13742.4.1.2.2.1.31
- 1.3.6.1.4.1.13742.4.1.2.2.1.4
Expand All @@ -19988,6 +19987,8 @@ modules:
- 1.3.6.1.4.1.13742.4.1.20.2.1.7
- 1.3.6.1.4.1.13742.4.1.20.2.1.8
- 1.3.6.1.4.1.13742.4.1.20.2.1.9
- 1.3.6.1.4.1.13742.6.3.5.3.1.2
- 1.3.6.1.4.1.13742.6.5.5.3.1
get:
- 1.3.6.1.4.1.13742.4.1.3.1.5.0
metrics:
Expand All @@ -20003,7 +20004,7 @@ modules:
- labels:
- outletIndex
labelname: outletLabel
oid: 1.3.6.1.4.1.13742.4.1.2.2.1.2
oid: 1.3.6.1.4.1.13742.6.3.5.3.1.2
type: DisplayString
enum_values:
-1: error
Expand All @@ -20021,7 +20022,7 @@ modules:
- labels:
- outletIndex
labelname: outletLabel
oid: 1.3.6.1.4.1.13742.4.1.2.2.1.2
oid: 1.3.6.1.4.1.13742.6.3.5.3.1.2
type: DisplayString
- name: outletCurrent
oid: 1.3.6.1.4.1.13742.4.1.2.2.1.4
Expand All @@ -20034,7 +20035,7 @@ modules:
- labels:
- outletIndex
labelname: outletLabel
oid: 1.3.6.1.4.1.13742.4.1.2.2.1.2
oid: 1.3.6.1.4.1.13742.6.3.5.3.1.2
type: DisplayString
- name: outletMaxCurrent
oid: 1.3.6.1.4.1.13742.4.1.2.2.1.5
Expand All @@ -20047,7 +20048,7 @@ modules:
- labels:
- outletIndex
labelname: outletLabel
oid: 1.3.6.1.4.1.13742.4.1.2.2.1.2
oid: 1.3.6.1.4.1.13742.6.3.5.3.1.2
type: DisplayString
- name: outletVoltage
oid: 1.3.6.1.4.1.13742.4.1.2.2.1.6
Expand All @@ -20061,7 +20062,7 @@ modules:
- labels:
- outletIndex
labelname: outletLabel
oid: 1.3.6.1.4.1.13742.4.1.2.2.1.2
oid: 1.3.6.1.4.1.13742.6.3.5.3.1.2
type: DisplayString
- name: outletActivePower
oid: 1.3.6.1.4.1.13742.4.1.2.2.1.7
Expand All @@ -20074,7 +20075,7 @@ modules:
- labels:
- outletIndex
labelname: outletLabel
oid: 1.3.6.1.4.1.13742.4.1.2.2.1.2
oid: 1.3.6.1.4.1.13742.6.3.5.3.1.2
type: DisplayString
- name: inletCurrent
oid: 1.3.6.1.4.1.13742.4.1.20.2.1.7
Expand Down Expand Up @@ -20103,6 +20104,144 @@ modules:
type: gauge
help: The value for the unit's CPU temperature sensor in tenth degrees celsius.
- 1.3.6.1.4.1.13742.4.1.3.1.5
- name: measurementsExternalSensorIsAvailable
oid: 1.3.6.1.4.1.13742.6.5.5.3.1.2
type: gauge
help: The sensor is present. - 1.3.6.1.4.1.13742.6.5.5.3.1.2
indexes:
- labelname: pduId
type: gauge
- labelname: sensorID
type: OctetString
enum_values:
1: "true"
2: "false"
- name: measurementsExternalSensorState
oid: 1.3.6.1.4.1.13742.6.5.5.3.1.3
type: gauge
help: The sensor state. - 1.3.6.1.4.1.13742.6.5.5.3.1.3
indexes:
- labelname: pduId
type: gauge
- labelname: sensorID
type: OctetString
enum_values:
-1: unavailable
0: open
1: closed
2: belowLowerCritical
3: belowLowerWarning
4: normal
5: aboveUpperWarning
6: aboveUpperCritical
7: "on"
8: "off"
9: detected
10: notDetected
11: alarmed
12: ok
14: fail
15: "yes"
16: "no"
17: standby
18: one
19: two
20: inSync
21: outOfSync
22: i1OpenFault
23: i1ShortFault
24: i2OpenFault
25: i2ShortFault
26: fault
27: warning
28: critical
29: selfTest
30: nonRedundant
- name: measurementsExternalSensorValue
oid: 1.3.6.1.4.1.13742.6.5.5.3.1.4
type: gauge
help: The sensor reading as a signed integer - 1.3.6.1.4.1.13742.6.5.5.3.1.4
indexes:
- labelname: pduId
type: gauge
- labelname: sensorID
type: OctetString
- name: measurementsExternalSensorTimeStamp
oid: 1.3.6.1.4.1.13742.6.5.5.3.1.5
type: gauge
help: The timestamp for reading. - 1.3.6.1.4.1.13742.6.5.5.3.1.5
indexes:
- labelname: pduId
type: gauge
- labelname: sensorID
type: OctetString
- name: measurementsExternalSensorMinMaxValid
oid: 1.3.6.1.4.1.13742.6.5.5.3.1.7
type: gauge
help: The minimum and maximum values of sensor reading and their timestamps
provided as measurementsExternalSensor[Signed]{Min|Max}{Value|TimeStamp} are
valid - 1.3.6.1.4.1.13742.6.5.5.3.1.7
indexes:
- labelname: pduId
type: gauge
- labelname: sensorID
type: OctetString
enum_values:
1: "true"
2: "false"
- name: measurementsExternalSensorMinValue
oid: 1.3.6.1.4.1.13742.6.5.5.3.1.8
type: gauge
help: The minimum value of sensor reading since last reset as a signed integer
The value of this OID variable should be scaled by externalSensorDecimalDigits
- 1.3.6.1.4.1.13742.6.5.5.3.1.8
indexes:
- labelname: pduId
type: gauge
- labelname: sensorID
type: OctetString
- name: measurementsExternalSensorMinTimeStamp
oid: 1.3.6.1.4.1.13742.6.5.5.3.1.10
type: gauge
help: The timestamp of last change of the minimum value of sensor reading provided
as measurementExternalSensor[Signed]MinValue - 1.3.6.1.4.1.13742.6.5.5.3.1.10
indexes:
- labelname: pduId
type: gauge
- labelname: sensorID
type: OctetString
- name: measurementsExternalSensorMaxValue
oid: 1.3.6.1.4.1.13742.6.5.5.3.1.11
type: gauge
help: The maximum value of sensor reading since last reset as a signed integer
The value of this OID variable should be scaled by externalSensorDecimalDigits
- 1.3.6.1.4.1.13742.6.5.5.3.1.11
indexes:
- labelname: pduId
type: gauge
- labelname: sensorID
type: OctetString
- name: measurementsExternalSensorMaxTimeStamp
oid: 1.3.6.1.4.1.13742.6.5.5.3.1.13
type: gauge
help: The timestamp of last change of the maximum value of sensor reading provided
as measurementExternalSensor[Signed]MaxValue - 1.3.6.1.4.1.13742.6.5.5.3.1.13
indexes:
- labelname: pduId
type: gauge
- labelname: sensorID
type: OctetString
- name: measurementsExternalSensorMinMaxResetTimeStamp
oid: 1.3.6.1.4.1.13742.6.5.5.3.1.14
type: gauge
help: The timestamp of last reset of all minimum and maximum values of sensor
reading including their timestamps, provided as measurementsExternalSensor[Signed]{Min|Max}{Value|TimeStamp}
and measurementsExternalSensorMinMaxValid - 1.3.6.1.4.1.13742.6.5.5.3.1.14
indexes:
- labelname: pduId
type: gauge
- labelname: sensorID
type: OctetString
servertech_sentry3:
walk:
- 1.3.6.1.4.1.1718.3.2.2
Expand Down

0 comments on commit 2ae8cfa

Please sign in to comment.