From eba420a53aa58449b49b57b77ac1a9bc854537af Mon Sep 17 00:00:00 2001 From: Josh Driver Date: Tue, 7 Jun 2016 22:31:47 +0930 Subject: [PATCH 1/2] Allow lmsensor fanspeeds of 0 to be discovered. --- includes/discovery/sensors/fanspeeds/lmsensors.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/discovery/sensors/fanspeeds/lmsensors.inc.php b/includes/discovery/sensors/fanspeeds/lmsensors.inc.php index 3127970f30..69b523fecc 100644 --- a/includes/discovery/sensors/fanspeeds/lmsensors.inc.php +++ b/includes/discovery/sensors/fanspeeds/lmsensors.inc.php @@ -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); } } From 871f2d7ac687bfc961b1c347161a916b7696321a Mon Sep 17 00:00:00 2001 From: Josh Driver Date: Thu, 9 Jun 2016 21:03:51 +0930 Subject: [PATCH 2/2] I agree to the conditions of the Contributor Agreement contained in doc/General/Contributing.md. --- AUTHORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS.md b/AUTHORS.md index 83644c51ed..100bf7f5c1 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -104,6 +104,7 @@ LibreNMS contributors: - Robert Verspuy (exarv) - Peter Tkatchenko (Peter2121) - Marc Runkel (mrunkel) +- Josh Driver (keeperofdakeys) [1]: http://observium.org/ "Observium web site" Observium was written by: