diff --git a/html/images/observer-logo.jpg b/html/images/observer-logo.jpg index e539da324e..42c1d5adfe 100644 Binary files a/html/images/observer-logo.jpg and b/html/images/observer-logo.jpg differ diff --git a/includes/discovery/interfaces.php b/includes/discovery/interfaces.php index b73c96b081..2ec681057b 100755 --- a/includes/discovery/interfaces.php +++ b/includes/discovery/interfaces.php @@ -39,6 +39,7 @@ if (preg_match('/ng[0-9]+$/', $if)) { $nullintf = 1; } } if ($nullintf == 0) { + echo("$if\n"); if(mysql_result(mysql_query("SELECT COUNT(*) FROM `interfaces` WHERE `device_id` = '".$device['device_id']."' AND `ifIndex` = '$ifIndex'"), 0) == '0') { mysql_query("INSERT INTO `interfaces` (`device_id`,`ifIndex`,`ifDescr`) VALUES ('".$device['device_id']."','$ifIndex','$ifDescr')"); # Add Interface @@ -60,6 +61,7 @@ # Delete Interface echo("-"); ## Deleted Interface } else { + echo("$if\n"); echo("X"); ## Ignored Interface } } diff --git a/includes/polling/ports.inc.php b/includes/polling/ports.inc.php index 1cf9641159..0f2c9796a0 100755 --- a/includes/polling/ports.inc.php +++ b/includes/polling/ports.inc.php @@ -80,12 +80,15 @@ /// Update IF-MIB data foreach ($data_oids as $oid) { - if ( $port[$oid] != $this_port[$oid]) { + if ( $port[$oid] != $this_port[$oid] && !isset($this_port[$oid])) { + $update .= ", `$oid` = NULL"; + mysql_query("INSERT INTO eventlog (`host`, `interface`, `datetime`, `message`) VALUES ('" . $device['device_id'] . "', '" . $port['interface_id'] . "', NOW(), '".$oid . ": ".$port[$oid]." -> NULL')"); + if($debug) { echo($oid . ": ".$port[$oid]." -> NULL "); } else { echo($oid . " "); } + } elseif ( $port[$oid] != $this_port[$oid] ) { $update .= ", `$oid` = '".mysql_real_escape_string($this_port[$oid])."'"; - #mysql_query("INSERT INTO eventlog (`host`, `interface`, `datetime`, `message`) VALUES ('" . $port['device_id'] . "', '" . $port['interface_id'] . "', NOW(), '".$oid . ": ".$port[$oid]." -> " . $this_port[$oid]."')"); #eventlog($device['device_id'], 'interface', $port['interface_id'], $oid . ": ".$port[$oid]." -> " . $this_port[$oid]); mysql_query("INSERT INTO eventlog (`host`, `interface`, `datetime`, `message`) VALUES ('" . $device['device_id'] . "', '" . $port['interface_id'] . "', NOW(), '".$oid . ": ".$port[$oid]." -> " . $this_port[$oid]."')"); - echo($oid . " "); + if($debug) { echo($oid . ": ".$port[$oid]." -> " . $this_port[$oid]." "); } else { echo($oid . " "); } } } @@ -159,11 +162,13 @@ /// Do EtherLike-MIB if($config['enable_etherlike']) { include("port-etherlike.inc.php"); } - if ($update) { /// Do Updates + // Update MySQL + if ($update) { $update_query = "UPDATE `interfaces` SET ".$update." WHERE `interface_id` = '" . $port['interface_id'] . "'"; @mysql_query($update_query); $mysql++; if($debug) {echo("\nMYSQL : [ $update_query ]");} - } /// End Updates + } + // End Update MySQL unset($update_query); unset($update); } else { diff --git a/map.php b/map.php index e4b0c1efd5..39db89324d 100755 --- a/map.php +++ b/map.php @@ -43,7 +43,6 @@ while($loc_data = mysql_fetch_array($loc_result)) { if(strpos($host, "bgw")) { $hostinfo = "shape=ellipse style=filled fillcolor=orange"; } if(strpos($host, "vax")) { $hostinfo = "shape=rect style=filled fillcolor=skyblue"; } if(strpos($host, "vsx")) { $hostinfo = "shape=box3d style=filled fillcolor=skyblue"; } - #} else { $hostinfo = "style=filled shape=circle fillcolor=lightgray"; } $host = $dev_data[hostname]; $host = str_replace("." . $config['mydomain'],"", $host);