Major updates on the road to 0.7

git-svn-id: http://www.observium.org/svn/observer/trunk@492 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-10-28 13:49:37 +00:00
parent bb969a845a
commit 1f1eda9764
47 changed files with 1034 additions and 1235 deletions

View File

@ -12,11 +12,9 @@ $i = '0';
$interface_query = mysql_query("SELECT * FROM `interfaces` AS I, `devices` AS D WHERE I.device_id = D.device_id $where");
while ($interface = mysql_fetch_array($interface_query)) {
$rrdfile = $config['rrd_dir'] . "/" . $interface['hostname'] . "/" . $interface['ifIndex'] . ".rrd";
$errors = interface_errors($rrdfile);
mysql_query("UPDATE `interfaces` SET in_errors = '" . $errors['in'] . "', out_errors = '" . $errors['out'] . "' WHERE interface_id = '" . $interface['interface_id'] . "'");
if($errors['in'] > '100' || $errors['out'] > '100') {
$errored[] = $interface['hostname'] . " - " . $interface['ifDescr'] . " - " . $interface['ifAlias'] . " - " . $errors['in'] . " - " . $errors['out'];
$errors = $interface['ifInErrors_delta'] + $interface['ifOutErrors_delta'];
if($errors > '1') {
$errored[] = $interface['hostname'] . " - " . $interface['ifDescr'] . " - " . $interface['ifAlias'] . " - " . $interface['ifInErrors_delta'] . " - " . $interface['ifOutErrors_delta'];
}
$i++;
}