fix sensors (maybe)

git-svn-id: http://www.observium.org/svn/observer/trunk@2236 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-05-04 11:04:19 +00:00
parent b3bd336515
commit a2891ea8f2
65 changed files with 172 additions and 183 deletions
+4 -4
View File
@@ -1,6 +1,6 @@
<?php
global $valid_sensor;
## APC
if ($device['os'] == "apc")
@@ -42,7 +42,7 @@ if ($device['os'] == "apc")
{
$descr = "Output";
}
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current);
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current);
}
}
}
@@ -97,7 +97,7 @@ if ($device['os'] == "apc")
$lowlimit = snmp_get($device, $lowlimit_oid, "-Oqv", "");
$warnlimit = snmp_get($device, $warnlimit_oid, "-Oqv", "");
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current);
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current);
}
}
@@ -126,7 +126,7 @@ if ($device['os'] == "apc")
$warnlimit = snmp_get($device, $warnlimit_oid, "-Oqv", ""); # No / $precision here! Nice, APC!
$descr = "Output Feed";
discover_sensor($valid_sensor, 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current);
discover_sensor($valid['sensor'], 'current', $device, $current_oid, $index, $type, $descr, '10', '1', $lowlimit, NULL, $warnlimit, $limit, $current);
}
unset($oids);