mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
newdevice: Added sensor metrics for APC IRRP 100/500 devices (#7024)
This commit is contained in:
@@ -32,4 +32,209 @@ modules:
|
||||
- { descr: spotMode, graph: 0, value: 19, generic: 0 }
|
||||
- { descr: eConversion, graph: 0, value: 20, generic: 0 }
|
||||
- { descr: chargerSpotmode, graph: 0, value: 21, generic: 0 }
|
||||
- { descr: inverterSpotmode, graph: 0, value: 22, generic: 0 }
|
||||
- { descr: inverterSpotmode, graph: 0, value: 22, generic: 0 }
|
||||
-
|
||||
oid: airIRRP100UnitStatusOperateMode
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.1.
|
||||
descr: Unit Status
|
||||
states:
|
||||
- { descr: standby, graph: 1, value: 1, generic: 1 }
|
||||
- { descr: on, graph: 1, value: 2, generic: 0 }
|
||||
- { descr: idle, graph: 1, value: 3, generic: 1 }
|
||||
- { descr: prestart, graph: 1, value: 4, generic: 1 }
|
||||
- { descr: service, graph: 1, value: 5, generic: 1 }
|
||||
- { descr: backup, graph: 1, value: 6, generic: 1 }
|
||||
- { descr: assist, graph: 1, value: 7, generic: 1 }
|
||||
-
|
||||
oid: airIRRP100UnitStatusInputState
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.21.
|
||||
descr: Input State
|
||||
states:
|
||||
- { descr: open, graph: 1, value: 1, generic: 0 }
|
||||
- { descr: closed, graph: 1, value: 2, generic: 2 }
|
||||
-
|
||||
oid: airIRRP100UnitStatusOutputState
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.22.
|
||||
descr: Output State
|
||||
states:
|
||||
- { descr: open, graph: 1, value: 1, generic: 0 }
|
||||
- { descr: closed, graph: 1, value: 2, generic: 2 }
|
||||
-
|
||||
oid: airIRRP500UnitStatusOperateMode
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.2.2.2.1.
|
||||
descr: Unit Status
|
||||
states:
|
||||
- { descr: standby, graph: 1, value: 1, generic: 1 }
|
||||
- { descr: on, graph: 1, value: 2, generic: 0 }
|
||||
- { descr: idle, graph: 1, value: 3, generic: 1 }
|
||||
- { descr: prestart, graph: 1, value: 4, generic: 1 }
|
||||
- { descr: backup, graph: 1, value: 5, generic: 1 }
|
||||
- { descr: assist, graph: 1, value: 6, generic: 1 }
|
||||
-
|
||||
oid: airIRRP500UnitStatusInputState
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.2.2.2.21.
|
||||
descr: Input State
|
||||
states:
|
||||
- { descr: open, graph: 1, value: 1, generic: 0 }
|
||||
- { descr: closed, graph: 1, value: 2, generic: 2 }
|
||||
-
|
||||
oid: airIRRP500UnitStatusOutputState
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.2.2.2.22.
|
||||
descr: Output State
|
||||
states:
|
||||
- { descr: open, graph: 1, value: 1, generic: 0 }
|
||||
- { descr: closed, graph: 1, value: 2, generic: 2 }
|
||||
temperature:
|
||||
data:
|
||||
-
|
||||
oid: airIRRP100UnitStatusRackInletTempMetric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.3.
|
||||
index: 'airIRRP100UnitStatusRackInletTempMetric.{{ $index }}'
|
||||
descr: Rack Inlet
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP100UnitStatusSupplyAirTempMetric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.5.
|
||||
index: 'airIRRP100UnitStatusSupplyAirTempMetric.{{ $index }}'
|
||||
descr: Supply Air
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP100UnitStatusReturnAirTempMetric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.7.
|
||||
index: 'airIRRP100UnitStatusReturnAirTempMetric.{{ $index }}'
|
||||
descr: Return Air
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP100UnitStatusRackInletTemperature1Metric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.24.
|
||||
index: 'airIRRP100UnitStatusRackInletTemperature1Metric.{{ $index }}'
|
||||
descr: 'Inlet #1'
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP100UnitStatusRackInletTemperature2Metric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.26.
|
||||
index: 'airIRRP100UnitStatusRackInletTemperature2Metric.{{ $index }}'
|
||||
descr: 'Inlet #2'
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP100UnitStatusRackInletTemperature3Metric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.28.
|
||||
index: 'airIRRP100UnitStatusRackInletTemperature3Metric.{{ $index }}'
|
||||
descr: 'Inlet #3'
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP100UnitStatusCompressorDriveHeatSinkTempMetric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.41.
|
||||
index: 'airIRRP100UnitStatusCompressorDriveHeatSinkTempMetric.{{ $index }}'
|
||||
descr: 'Compressor Drive Heatsink'
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP100UnitStatusCompressorDriveControlCardTempMetric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.43.
|
||||
index: 'airIRRP100UnitStatusCompressorDriveControlCardTempMetric.{{ $index }}'
|
||||
descr: 'Compressor Drive Control Card'
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP500UnitStatusSupplyAirTempMetric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.2.2.2.5.
|
||||
index: 'airIRRP500UnitStatusSupplyAirTempMetric.{{ $index }}'
|
||||
descr: Supply Air
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP500UnitStatusReturnAirTempMetric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.2.2.2.7.
|
||||
index: 'airIRRP500UnitStatusReturnAirTempMetric.{{ $index }}'
|
||||
descr: Return Air
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP500UnitStatusRackInletTemperature1Metric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.2.2.2.24.
|
||||
index: 'airIRRP500UnitStatusRackInletTemperature1Metric.{{ $index }}'
|
||||
descr: 'Inlet #1'
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP500UnitStatusRackInletTemperature2Metric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.2.2.2.26.
|
||||
index: 'airIRRP500UnitStatusRackInletTemperature2Metric.{{ $index }}'
|
||||
descr: 'Inlet #2'
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP500UnitStatusRackInletTemperature3Metric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.2.2.2.28.
|
||||
index: 'airIRRP500UnitStatusRackInletTemperature3Metric.{{ $index }}'
|
||||
descr: 'Inlet #3'
|
||||
divisor: 10
|
||||
humidity:
|
||||
data:
|
||||
-
|
||||
oid: airIRRP100UnitStatusSupplyHumidity
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.8.
|
||||
index: 'airIRRP100UnitStatusSupplyHumidity.{{ $index }}'
|
||||
descr: Supply
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP100UnitStatusReturnHumidity
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.8.
|
||||
index: 'airIRRP100UnitStatusReturnHumidity.{{ $index }}'
|
||||
descr: Return
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP500UnitStatusSupplyHumidity
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.2.2.2.8.
|
||||
index: 'airIRRP500UnitStatusSupplyHumidity.{{ $index }}'
|
||||
descr: Supply
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP500UnitStatusReturnHumidity
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.2.2.2.8.
|
||||
index: 'airIRRP500UnitStatusSupplyHumidity.{{ $index }}'
|
||||
descr: Return
|
||||
divisor: 10
|
||||
airflow:
|
||||
data:
|
||||
-
|
||||
oid: airIRRP100UnitStatusAirFlowMetric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.11.
|
||||
index: 'airIRRP100UnitStatusAirFlowMetric.{{ $index }}'
|
||||
descr: Air Flow
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP500UnitStatusAirFlowMetric
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.2.2.2.11.
|
||||
index: 'airIRRP500UnitStatusAirFlowMetric.{{ $index }}'
|
||||
descr: Air Flow
|
||||
divisor: 10
|
||||
voltage:
|
||||
data:
|
||||
-
|
||||
oid: airIRRP100UnitStatusCompressorDriveVoltage
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.37.
|
||||
index: 'airIRRP100UnitStatusCompressorDriveVoltage.{{ $index }}'
|
||||
descr: Compressor Drive
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP100UnitStatusCompressorDriveDCLinkVoltage
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.39.
|
||||
index: 'airIRRP100UnitStatusCompressorDriveDCLinkVoltage.{{ $index }}'
|
||||
descr: Compressor Drive DC Link
|
||||
divisor: 10
|
||||
current:
|
||||
data:
|
||||
-
|
||||
oid: airIRRP100UnitStatusHumidifierCurrent
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.33.
|
||||
index: 'airIRRP100UnitStatusHumidifierCurrent.{{ $index }}'
|
||||
descr: Humidifier
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP100UnitStatusCompressorDriveCurrent
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.1.2.2.38.
|
||||
index: 'airIRRP100UnitStatusCompressorDriveCurrent.{{ $index }}'
|
||||
descr: Compressor Drive
|
||||
divisor: 10
|
||||
-
|
||||
oid: airIRRP500UnitStatusHumidifierCurrent
|
||||
num_oid: .1.3.6.1.4.1.318.1.1.13.3.3.2.2.2.33.
|
||||
index: 'airIRRP100UnitStatusHumidifierCurrent.{{ $index }}'
|
||||
descr: Humidifier
|
||||
divisor: 10
|
@@ -1,94 +1,15 @@
|
||||
<?php
|
||||
|
||||
// PDU
|
||||
$serial = trim(snmp_get($device, 'PowerNet-MIB::rPDUIdentSerialNumber.0', '-OQv'), '"');
|
||||
|
||||
if ($serial == '') {
|
||||
// ATS
|
||||
$serial = trim(snmp_get($device, 'PowerNet-MIB::atsIdentSerialNumber.0', '-OQv'), '"');
|
||||
}
|
||||
|
||||
if ($serial == '') {
|
||||
// UPS
|
||||
$serial = trim(snmp_get($device, 'PowerNet-MIB::upsAdvIdentSerialNumber.0', '-OQv'), '"');
|
||||
}
|
||||
|
||||
if ($serial == '') {
|
||||
// Masterswitch/AP9606
|
||||
$serial = trim(snmp_get($device, 'PowerNet-MIB::sPDUIdentSerialNumber.0', '-OQv'), '"');
|
||||
}
|
||||
|
||||
if ($serial == '') {
|
||||
// InRow chiller
|
||||
$serial = trim(snmp_get($device, 'PowerNet-MIB::airIRRCUnitIdentSerialNumber.0', '-OQv'), '"');
|
||||
}
|
||||
|
||||
if ($serial == '') {
|
||||
// InfraStruxure
|
||||
$serial = trim(snmp_get($device, 'PowerNet-MIB::isxModularPduIdentSerialNumber.0', '-OQv'), '"');
|
||||
}
|
||||
|
||||
//
|
||||
// PDU
|
||||
$hardware = trim(snmp_get($device, 'PowerNet-MIB::rPDUIdentModelNumber.0', '-OQv'), '"');
|
||||
$hardware .= ' '.trim(snmp_get($device, 'PowerNet-MIB::rPDUIdentHardwareRev.0', '-OQv'), '"');
|
||||
|
||||
if ($hardware == ' ') {
|
||||
// ATS
|
||||
$hardware = trim(snmp_get($device, 'PowerNet-MIB::atsIdentModelNumber.0', '-OQv'), '"');
|
||||
$hardware .= ' '.trim(snmp_get($device, 'PowerNet-MIB::atsIdentHardwareRev.0', '-OQv'), '"');
|
||||
}
|
||||
|
||||
if ($hardware == ' ') {
|
||||
// UPS
|
||||
$hardware = trim(snmp_get($device, 'PowerNet-MIB::upsBasicIdentModel.0', '-OQv'), '"');
|
||||
$hardware .= ' '.trim(snmp_get($device, 'PowerNet-MIB::upsAdvIdentFirmwareRevision.0', '-OQv'), '"');
|
||||
}
|
||||
|
||||
if ($hardware == ' ') {
|
||||
// Masterswitch/AP9606
|
||||
$hardware = trim(snmp_get($device, 'PowerNet-MIB::sPDUIdentModelNumber.0', '-OQv'), '"');
|
||||
$hardware .= ' '.trim(snmp_get($device, 'PowerNet-MIB::sPDUIdentHardwareRev.0', '-OQv'), '"');
|
||||
}
|
||||
|
||||
if ($hardware == ' ') {
|
||||
// InRow chiller
|
||||
$hardware = trim(snmp_get($device, 'PowerNet-MIB::airIRRCUnitIdentModelNumber.0', '-OQv'), '"');
|
||||
$hardware .= ' '.trim(snmp_get($device, 'PowerNet-MIB::airIRRCUnitIdentHardwareRevision.0', '-OQv'), '"');
|
||||
}
|
||||
|
||||
if ($hardware == ' ') {
|
||||
// InfraStruxure
|
||||
$hardware = trim(snmp_get($device, 'PowerNet-MIB::isxModularPduIdentModelNumber.0', '-OQv'), '"');
|
||||
$hardware .= ' '.trim(snmp_get($device, 'PowerNet-MIB::isxModularPduIdentMonitorCardHardwareRev.0', '-OQv'), '"');
|
||||
}
|
||||
|
||||
$apc_serial = snmp_get_multi_oid($device, 'rPDUIdentSerialNumber.0 atsIdentSerialNumber.0 upsAdvIdentSerialNumber.0 sPDUIdentSerialNumber.0 airIRRCUnitIdentSerialNumber.0 isxModularPduIdentSerialNumber.0 airIRRP100UnitIdentSerialNumber.0 airIRRP500UnitIdentSerialNumber.0', '-OUQs', 'PowerNet-MIB');
|
||||
$serial = trim(array_pop($apc_serial), '"');
|
||||
$apc_model = snmp_get_multi_oid($device, 'rPDUIdentModelNumber.0 rPDUIdentModelNumber.0 upsBasicIdentModel.0 sPDUIdentModelNumber.0 airIRRCUnitIdentModelNumber.0 isxModularPduIdentModelNumber.0 airIRRP100UnitIdentModelNumber.0 airIRRP500UnitIdentModelNumber.0', '-OUQs', 'PowerNet-MIB');
|
||||
$hardware = trim(array_pop($apc_model), '"');
|
||||
$apc_hardware = snmp_get_multi_oid($device, 'rPDUIdentHardwareRev.0 atsIdentHardwareRev.0 upsAdvIdentFirmwareRevision.0 sPDUIdentHardwareRev.0 airIRRCUnitIdentHardwareRevision.0 isxModularPduIdentMonitorCardHardwareRev.0 airIRRP100UnitIdentHardwareRevision.0 airIRRP500UnitIdentHardwareRevision.0', '-OUQs', 'PowerNet-MIB');
|
||||
$hardware .= ' ' . trim(array_pop($apc_hardware), '"');
|
||||
$AOSrev = trim(snmp_get($device, '1.3.6.1.4.1.318.1.4.2.4.1.4.1', '-OQv', '', ''), '"');
|
||||
$APPrev = trim(snmp_get($device, '1.3.6.1.4.1.318.1.4.2.4.1.4.2', '-OQv', '', ''), '"');
|
||||
|
||||
if ($AOSrev == '') {
|
||||
// PDU
|
||||
$version = trim(snmp_get($device, 'PowerNet-MIB::rPDUIdentFirmwareRev.0', '-OQv'), '"');
|
||||
|
||||
if ($version == '') {
|
||||
// ATS
|
||||
$version = trim(snmp_get($device, 'PowerNet-MIB::atsIdentFirmwareRev.0', '-OQv'), '"');
|
||||
}
|
||||
|
||||
if ($version == '') {
|
||||
// Masterswitch/AP9606
|
||||
$version = trim(snmp_get($device, 'PowerNet-MIB::sPDUIdentFirmwareRev.0', '-OQv'), '"');
|
||||
}
|
||||
|
||||
if ($version == '') {
|
||||
// InRow chiller
|
||||
$version = trim(snmp_get($device, 'PowerNet-MIB::airIRRCUnitIdentFirmwareRevision.0', '-OQv'), '"');
|
||||
}
|
||||
|
||||
if ($version == '') {
|
||||
// InfraStruxure
|
||||
$version = trim(snmp_get($device, 'PowerNet-MIB::isxModularPduIdentMonitorCardFirmwareAppRev.0', '-OQv'), '"');
|
||||
}
|
||||
$apc_version = snmp_get_multi_oid($device, 'rPDUIdentFirmwareRev.0 atsIdentFirmwareRev.0 sPDUIdentFirmwareRev.0 airIRRCUnitIdentFirmwareRevision.0 isxModularPduIdentMonitorCardFirmwareAppRev.0 airIRRP100UnitIdentFirmwareRevision.0 airIRRP500UnitIdentFirmwareRevision.0', '-OUQs', 'PowerNet-MIB');
|
||||
$version = trim(array_pop($apc_version), '"');
|
||||
} else {
|
||||
$version = "AOS $AOSrev / App $APPrev";
|
||||
}//end if
|
||||
|
Reference in New Issue
Block a user