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:
Tom Laermans
2011-03-15 10:54:59 +00:00
parent 0236f7aff8
commit e43eaf7461
10 changed files with 34 additions and 31 deletions
+5 -5
View File
@@ -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);
}
}
}
}
?>
?>