diff --git a/includes/definitions/discovery/hpe-ipdu.yaml b/includes/definitions/discovery/hpe-ipdu.yaml new file mode 100644 index 0000000000..9356bbff73 --- /dev/null +++ b/includes/definitions/discovery/hpe-ipdu.yaml @@ -0,0 +1,45 @@ +mib: CPQPOWER-MIB +modules: + sensors: + current: + data: + - + oid: mpduOutputEntry + value: mpduOutputCurrent + num_oid: .1.3.6.1.4.1.232.165.5.2.1.1.7. + skip_values: -1 + divisor: 100 + index: 'mpduOutputCurrent.{{ $index }}' + descr: 'MPDU #{{ $mpduOutputIndex }} Current' + load: + data: + - + oid: mpduOutputEntry + value: mpduOutputPercentLoad + num_oid: .1.3.6.1.4.1.232.165.5.2.1.1.5. + skip_values: -1 + divisor: 10 + index: 'mpduOutputPercentLoad.{{ $index }}' + descr: 'MPDU #{{ $mpduOutputIndex }} Load' + warn_limit: mpduOutputWarningThreshold + high_limit: mpduOutputCriticalThreshold + power: + data: + - + oid: mpduOutputEntry + value: mpduOutputPowerFactor + num_oid: .1.3.6.1.4.1.232.165.5.2.1.1.10. + skip_values: -1 + divisor: 100 + index: 'mpduOutputPowerFactor.{{ $index }}' + descr: 'MPDU #{{ $mpduOutputIndex }} Power' + voltage: + data: + - + oid: mpduOutputEntry + value: mpduOutputVoltage + num_oid: .1.3.6.1.4.1.232.165.5.2.1.1.6. + skip_values: -1 + divisor: 10 + index: 'mpduOutputVoltage.{{ $index }}' + descr: 'MPDU #{{ $mpduOutputIndex }} Voltage' diff --git a/includes/discovery/sensors/current/hpe-ipdu.inc.php b/includes/discovery/sensors/current/hpe-ipdu.inc.php deleted file mode 100644 index d475f3c1f9..0000000000 --- a/includes/discovery/sensors/current/hpe-ipdu.inc.php +++ /dev/null @@ -1,45 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2017 Neil Lathwood - * @author Neil Lathwood - */ - - -echo 'HPE iPDU Current '; - -$x=1; -foreach ($pre_cache['hpe_ipdu'] as $index => $item) { - if (isset($item['mpduOutputCurrent'])) { - $oid = '.1.3.6.1.4.1.232.165.5.2.1.1.7.' . $index; - $current = $item['mpduOutputCurrent']; - discover_sensor($valid['sensor'], 'current', $device, $oid, 'mpduOutputCurrent.'.$index, 'hpe-ipdu', "MPDU #$x Current", 100, 1, null, null, null, null, $current); - $x++; - } -}//end foreach - -unset( - $item, - $oid, - $index, - $item, - $x -); diff --git a/includes/discovery/sensors/load/hpe-ipdu.inc.php b/includes/discovery/sensors/load/hpe-ipdu.inc.php deleted file mode 100644 index a451578faf..0000000000 --- a/includes/discovery/sensors/load/hpe-ipdu.inc.php +++ /dev/null @@ -1,45 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2017 Neil Lathwood - * @author Neil Lathwood - */ - - -echo 'HPE iPDU Load '; - -$x=1; -foreach ($pre_cache['hpe_ipdu'] as $index => $item) { - if (isset($item['mpduOutputPercentLoad'])) { - $oid = '.1.3.6.1.4.1.232.165.5.2.1.1.5.' . $index; - $current = $item['mpduOutputPercentLoad']; - discover_sensor($valid['sensor'], 'load', $device, $oid, 'mpduOutputPercentLoad.'.$index, 'hpe-ipdu', "MPDU #$x Load", 10, 1, null, null, null, null, $current); - $x++; - } -}//end foreach - -unset( - $item, - $oid, - $index, - $item, - $x -); diff --git a/includes/discovery/sensors/power/hpe-ipdu.inc.php b/includes/discovery/sensors/power/hpe-ipdu.inc.php deleted file mode 100644 index 488a28f94d..0000000000 --- a/includes/discovery/sensors/power/hpe-ipdu.inc.php +++ /dev/null @@ -1,45 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2017 Neil Lathwood - * @author Neil Lathwood - */ - - -echo 'HPE iPDU Power '; - -$x=1; -foreach ($pre_cache['hpe_ipdu'] as $index => $item) { - if (isset($item['mpduOutputPowerFactor'])) { - $oid = '.1.3.6.1.4.1.232.165.5.2.1.1.10.' . $index; - $current = $item['mpduOutputPowerFactor']; - discover_sensor($valid['sensor'], 'power', $device, $oid, 'mpduOutputPowerFactor.'.$index, 'hpe-ipdu', "MPDU #$x Power", 100, 1, null, null, null, null, $current); - $x++; - } -}//end foreach - -unset( - $item, - $oid, - $index, - $item, - $x -); diff --git a/includes/discovery/sensors/pre-cache/hpe-ipdu.inc.php b/includes/discovery/sensors/pre-cache/hpe-ipdu.inc.php deleted file mode 100644 index 92fd090be8..0000000000 --- a/includes/discovery/sensors/pre-cache/hpe-ipdu.inc.php +++ /dev/null @@ -1,27 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2017 Neil Lathwood - * @author Neil Lathwood - */ - -echo 'mpduOutputEntry '; -$pre_cache['hpe_ipdu'] = snmpwalk_cache_oid($device, 'mpduOutputEntry', array(), 'CPQPOWER-MIB'); diff --git a/includes/discovery/sensors/voltage/hpe-ipdu.inc.php b/includes/discovery/sensors/voltage/hpe-ipdu.inc.php deleted file mode 100644 index 8e926ed2f5..0000000000 --- a/includes/discovery/sensors/voltage/hpe-ipdu.inc.php +++ /dev/null @@ -1,45 +0,0 @@ -. - * - * @package LibreNMS - * @link http://librenms.org - * @copyright 2017 Neil Lathwood - * @author Neil Lathwood - */ - - -echo 'HPE iPDU Voltage '; - -$x=1; -foreach ($pre_cache['hpe_ipdu'] as $index => $item) { - if (isset($item['mpduOutputVoltage'])) { - $oid = '.1.3.6.1.4.1.232.165.5.2.1.1.6.' . $index; - $current = $item['mpduOutputVoltage']; - discover_sensor($valid['sensor'], 'voltage', $device, $oid, 'mpduOutputVoltage.'.$index, 'hpe-ipdu', "MPDU #$x Voltage", 10, 1, null, null, null, null, $current); - $x++; - } -}//end foreach - -unset( - $item, - $oid, - $index, - $item, - $x -);