diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php index 5530691100..aabad8a2aa 100644 --- a/includes/polling/ports.inc.php +++ b/includes/polling/ports.inc.php @@ -410,6 +410,9 @@ foreach ($ports as $port) { } } $port['update'][$oid] = $this_port[$oid]; + if ($oid == 'ifOperStatus' || $oid == 'ifAdminStatus') { + $port['update'][$oid.'_prev'] = $port[$oid]; + } log_event($oid.': '.$port[$oid].' -> '.$this_port[$oid], $device, 'interface', $port['port_id']); if ($debug) { d_echo($oid.': '.$port[$oid].' -> '.$this_port[$oid].' '); diff --git a/sql-schema/099.sql b/sql-schema/099.sql new file mode 100644 index 0000000000..814d2abc91 --- /dev/null +++ b/sql-schema/099.sql @@ -0,0 +1,2 @@ +ALTER TABLE `ports` ADD `ifOperStatus_prev` VARCHAR( 16 ) NULL AFTER `ifOperStatus` ; +ALTER TABLE `ports` ADD `ifAdminStatus_prev` VARCHAR( 16 ) NULL AFTER `ifAdminStatus` ;