mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@ -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++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user