#!/usr/bin/php '100' || $errors['out'] > '100') { $errored[] = $interface['hostname'] . " - " . $interface['ifDescr'] . " - " . $interface['ifAlias'] . " - " . $errors['in'] . " - " . $errors['out']; } } if($errored) { ## If there are errored interfaces $i=0; $msg = "Interfaces with errors : \n\n"; foreach ($errored as $int) { $msg .= "$int\n"; ## Add a line to the report email warning about them $i++; } ## Send the alert email mail($config['email_default'], "Observer detected errors on $i interfaces", $msg, $config['email_headers']); } ?>