mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added sensors for outlets on Schleifenbauer devices. (#10949)
* Added sensors for outlets on Schleifenbauer devices. Also use the outlet name when configured. * Updated tests for Schleifenbauer * Fixed on test for Schleifenbauer * Optimized polling by retriving only outlets from the device with the network connection, not all devices on the data-bus. * Fixed code styling * Use shorthand comparisons for names * Fix for conflicting $entPhysicalIndex
This commit is contained in:
committed by
GitHub
parent
5242c26fb4
commit
d61cfb5688
@@ -16,6 +16,9 @@ $pre_cache['sdbMgmtCtrlDevUnitAddress'] = current(snmpwalk_array_num($device, '.
|
||||
echo 'sdbDevIdSerialNumber ';
|
||||
$pre_cache['sdbDevIdSerialNumber'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.1.1.1.6', 1));
|
||||
|
||||
echo 'sdbDevInName ';
|
||||
$pre_cache['sdbDevInName'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.6.1.1.13', 2));
|
||||
|
||||
echo 'sdbDevInActualVoltage ';
|
||||
$pre_cache['sdbDevInActualVoltage'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.6.1.1.7', 2));
|
||||
|
||||
@@ -36,3 +39,24 @@ $pre_cache['sdbDevInKWhTotal'] = current(snmpwalk_array_num($device, '.
|
||||
|
||||
echo 'sdbDevInPowerFactor ';
|
||||
$pre_cache['sdbDevInPowerFactor'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.6.1.1.4', 2));
|
||||
|
||||
echo 'sdbDevOutName ';
|
||||
$pre_cache['sdbDevOutName'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.7.1.1.2.' . current($pre_cache['sdbMgmtCtrlDevUnitAddress']), 1));
|
||||
|
||||
echo 'sdbDevOutMtActualVoltage ';
|
||||
$pre_cache['sdbDevOutMtActualVoltage'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.7.2.1.7.' . current($pre_cache['sdbMgmtCtrlDevUnitAddress']), 1));
|
||||
|
||||
echo 'sdbDevOutMtActualCurrent ';
|
||||
$pre_cache['sdbDevOutMtActualCurrent'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.7.2.1.5.' . current($pre_cache['sdbMgmtCtrlDevUnitAddress']), 1));
|
||||
|
||||
echo 'sdbDevOutMtMaxAmps ';
|
||||
$pre_cache['sdbDevOutMtMaxAmps'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.7.2.1.8.' . current($pre_cache['sdbMgmtCtrlDevUnitAddress']), 1));
|
||||
|
||||
echo 'sdbDevOutMtPowerVoltAmpere ';
|
||||
$pre_cache['sdbDevOutMtPowerVoltAmpere']= current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.7.2.1.10.' . current($pre_cache['sdbMgmtCtrlDevUnitAddress']), 1));
|
||||
|
||||
echo 'sdbDevOutMtKWhTotal ';
|
||||
$pre_cache['sdbDevOutMtKWhTotal'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.7.2.1.2.' . current($pre_cache['sdbMgmtCtrlDevUnitAddress']), 1));
|
||||
|
||||
echo 'sdbDevOutMtPowerFactor ';
|
||||
$pre_cache['sdbDevOutMtPowerFactor'] = current(snmpwalk_array_num($device, '.1.3.6.1.4.1.31034.12.1.1.2.7.2.1.4.' . current($pre_cache['sdbMgmtCtrlDevUnitAddress']), 1));
|
||||
|
Reference in New Issue
Block a user