mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 00:24:21 +02:00
More cleanups and reindents, half way there
git-svn-id: http://www.observium.org/svn/observer/trunk@1838 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -8,10 +8,10 @@ if ($device['os'] == 'akcp' || $device['os'] == 'minkelsrms')
|
||||
if ($debug) { echo($oids."\n"); }
|
||||
$oids = trim($oids);
|
||||
if ($oids) echo("AKCP ");
|
||||
foreach(explode("\n", $oids) as $data)
|
||||
foreach (explode("\n", $oids) as $data)
|
||||
{
|
||||
$data = trim($data);
|
||||
if ($data)
|
||||
if ($data)
|
||||
{
|
||||
list($oid,$status) = explode(" ", $data,2);
|
||||
if ($status == 2) # 2 = normal, 0 = not connected
|
||||
@@ -24,18 +24,18 @@ if ($device['os'] == 'akcp' || $device['os'] == 'minkelsrms')
|
||||
$limit_oid = ".1.3.6.1.4.1.3854.1.2.2.1.17.1.8.$index";
|
||||
$warnlowlimit_oid = ".1.3.6.1.4.1.3854.1.2.2.1.17.1.9.$index";
|
||||
$lowlimit_oid = ".1.3.6.1.4.1.3854.1.2.2.1.17.1.10.$index";
|
||||
|
||||
|
||||
$descr = trim(snmp_get($device, $descr_oid, "-Oqv", ""),'"');
|
||||
$humidity = snmp_get($device, $oid, "-Oqv", "");
|
||||
$warnlimit = snmp_get($device, $warnlimit_oid, "-Oqv", "");
|
||||
$limit = snmp_get($device, $limit_oid, "-Oqv", "");
|
||||
$lowlimit = snmp_get($device, $lowlimit_oid, "-Oqv", "");
|
||||
$warnlowlimit = snmp_get($device, $warnlowlimit_oid, "-Oqv", "");
|
||||
|
||||
|
||||
discover_sensor($valid_sensor, 'humidity', $device, $oid, $index, 'akcp', $descr, '1', '1', $lowlimit, $warnlowlimit, $limit, $warnlimit, $humidity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user