better structure. use the array. clear it afterwards. :D

git-svn-id: http://www.observium.org/svn/observer/trunk@1846 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-03-15 14:31:27 +00:00
parent 043ac28dec
commit be39e3d900

View File

@@ -19,15 +19,19 @@ if ($device['os'] == "ftos" || $device['os_group'] == "ftos")
{
foreach ($oids as $index => $entry)
{
$descr = "Slot ".$index;
$oid = ".1.3.6.1.4.1.6027.3.8.1.2.1.1.5.".$index;
$current = $entry['chSysCardTemp'];
$entry['descr'] = "Slot ".$index;
$entry['oid'] = ".1.3.6.1.4.1.6027.3.8.1.2.1.1.5.".$index;
$entry['current'] = $entry['chSysCardTemp'];
discover_sensor($valid_sensor, 'temperature', $device, $entry['oid'], $index, 'ftos-cseries', $entry['descr'], '1', '1', NULL, NULL, NULL, NULL, $entry['current']);
discover_sensor($valid_sensor, 'temperature', $device, $oid, $index, 'ftos-cseries', $descr, '1', '1', NULL, NULL, NULL, NULL, $current);
}
unset($entry);
}
unset($oids);
}
?>
?>