diff --git a/discovery.php b/discovery.php index a463dec3df..38228e5019 100755 --- a/discovery.php +++ b/discovery.php @@ -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; } diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php index c7bb71b68f..465666001d 100755 --- a/includes/polling/ports.inc.php +++ b/includes/polling/ports.inc.php @@ -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"); }