mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Allow lmsensor fanspeeds of 0 to be discovered.
This commit is contained in:
@ -19,7 +19,7 @@ if ($device['os'] == 'linux' || $device['os'] == 'pktj' || $device['os'] == 'cu
|
||||
$oid = '1.3.6.1.4.1.2021.13.16.3.1.3.'.$index;
|
||||
$current = snmp_get($device, $oid, '-Oqv', 'LM-SENSORS-MIB');
|
||||
$descr = trim(str_ireplace('fan-', '', $descr));
|
||||
if ($current > '0') {
|
||||
if ($current !== false && $current >= 0) {
|
||||
discover_sensor($valid['sensor'], 'fanspeed', $device, $oid, $index, 'lmsensors', $descr, '1', '1', null, null, null, null, $current);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user