reactivate interface eventlogging

git-svn-id: http://www.observium.org/svn/observer/trunk@549 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-12-14 21:02:07 +00:00
parent 7501a98407
commit 5a1183601f
2 changed files with 10 additions and 0 deletions

View File

@ -38,6 +38,7 @@ if(!$where) {
exit;
}
echo("Applying database updates...\n");
shell_exec("scripts/update-sql.php database-update.sql");
if(isset($options['d'])) { echo("DEBUG!\n"); $debug = 1; }

View File

@ -145,6 +145,15 @@
}
// End Update PAgP
// Do Eventlogging
$eventlog_oids = array('ifDescr', 'ifName', 'ifAlias', 'ifOperStatus', 'ifAdminStatus');
foreach ($data_oids as $oid) { // Loop the OIDs
if ( $port[$oid] != $this_port[oid]) {
mysql_query("INSERT INTO eventlog (`host`, `interface`, `datetime`, `message`) VALUES ('" . $interface['device_id'] . "', '" . $interface['interface_id'] . "', NOW(), '$oid -> ".$this_port[$oid]."')");
}
}
// End Eventlogging
/// Do EtherLike-MIB
if($config['enable_etherlike']) { include("port-etherlike.inc.php"); }