fix: Fixed Raspberry Pi sensors (#7131)

* fix: Fixing Raspberry Pi sensors

* Update linux.inc.php

* Update linux.inc.php

* Update linux.inc.php
This commit is contained in:
Neil Lathwood
2017-08-08 21:31:22 +01:00
committed by GitHub
parent 1098529c62
commit 40f25aa17a
4 changed files with 5 additions and 5 deletions

View File

@@ -4,7 +4,7 @@
* requires snmp extend agent script from librenms-agent
*/
$state = "raspberry_codec";
$oid = '1.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.';
$oid = '.1.3.6.1.4.1.8072.1.3.2.4.1.2.9.114.97.115.112.98.101.114.114.121.';
for ($codec = 8; $codec < 14; $codec++) {
switch ($codec) {
case "8":
@@ -26,7 +26,7 @@ for ($codec = 8; $codec < 14; $codec++) {
$descr = "WMV9 codec";
break;
}
$value = current($pre_cache['raspberry_pi_sensors'][$oid.$codec]);
$value = current($pre_cache['raspberry_pi_sensors']["raspberry.".$codec]);
if (stripos($value, 'abled') !== false) {
$state_index_id = create_state_index($state);
if ($state_index_id) {