diff --git a/discovery.php b/discovery.php index 99edfa3f7d..f386747fe8 100755 --- a/discovery.php +++ b/discovery.php @@ -77,6 +77,10 @@ while ($device = mysql_fetch_array($device_query)) { ## hr-device.inc.php include("includes/discovery/hr-device.inc.php"); + ## CDP & LLDP + include("includes/discovery/cdp-lldp.inc.php"); + + if($device['os'] == "netscreen") { if ($device['type'] == "unknown") { $device['type'] = 'firewall'; } } @@ -95,7 +99,6 @@ while ($device = mysql_fetch_array($device_query)) { include("includes/discovery/cisco-processors.php"); include("includes/discovery/cemp-mib.php"); include("includes/discovery/cmp-mib.php"); - include("includes/discovery/cdp-lldp.inc.php"); if ($device['type'] == "unknown") { $device['type'] = 'network'; }; } @@ -103,7 +106,6 @@ while ($device = mysql_fetch_array($device_query)) { if ($device['os'] == "procurve" || $device['os'] == "powerconnect") { include("includes/discovery/q-bridge-mib.php"); - include("includes/discovery/cdp-lldp.inc.php"); if ($device['type'] == "unknown") { $device['type'] = 'network'; }; } diff --git a/html/map.php b/html/map.php index b211a0fa3e..0fadefe907 100755 --- a/html/map.php +++ b/html/map.php @@ -60,6 +60,11 @@ while($link = mysql_fetch_array($links)) { $map .= "\"" . $sif['interface_id'] . "\" [label=\"" . $sif['label'] . "\", fontsize=12, fillcolor=lightblue URL=\"/device/".$device['device_id']."/interface/$src_if/\"]\n"; $map .= "\"$src\" -> \"" . $sif['interface_id'] . "\" [weight=500000, arrowsize=0, len=0];\n"; + $map .= "\"$src$sif\" [label=\"$sif\", fontsize=12, fillcolor=lightblue URL=\"/device/".$device['device_id']."/interface/$src_if/\"]\n"; + $map .= "\"$src\" -> \"$src$sif\" [weight=50000000, arrowsize=0, len=0];\n"; + +# $map .= "\"$src$sif\" -> \"$dst$dif\" [weight=1] \n"; + $map .= "\"$dst\" [URL=\"/device/$dst_host/map/\" fontsize=20 shape=box3d]\n"; if($dst_host == $device['device_id']) { @@ -69,8 +74,7 @@ while($link = mysql_fetch_array($links)) { } - $map .= "\"" . $dif['interface_id'] . "\" -> \"$dst\" [weight=500000, arrowsize=0, len=0];\n"; - $map .= "\"" . $sif['interface_id'] . "\" -> \"" . $dif['interface_id'] . "\" [weight=1, arrowhead=normal, arrowtail=normal, len=2, $info] \n"; + $map .= "\"$dst$dif\" -> \"$dst\" [weight=50000000, arrowsize=0, len=0];\n"; } diff --git a/includes/functions-poller.inc.php b/includes/functions-poller.inc.php index fe1428634c..220d3ccc98 100644 --- a/includes/functions-poller.inc.php +++ b/includes/functions-poller.inc.php @@ -89,7 +89,7 @@ function snmpwalk_cache_twopart_oid($oid, $device, $array, $mib = 0) { } function snmpwalk_cache_threepart_oid($oid, $device, $array, $mib = 0) { - global $config; + global $config;$debug; $cmd = $config['snmpbulkwalk'] . " -O Qs -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname'].":".$device['port'] . " "; if($mib) { $cmd .= "-m $mib "; } @@ -100,6 +100,7 @@ function snmpwalk_cache_threepart_oid($oid, $device, $array, $mib = 0) { list($oid,$value) = explode("=", $entry); $oid = trim($oid); $value = trim($value); list($oid, $first, $second, $third) = explode(".", $oid); + if($debug) {echo("$entry || $oid || $first || $second || $third\n");} if (!strstr($this_value, "at this OID") && isset($oid) && isset($first) && isset($second) && isset($third)) { $array[$device_id][$first][$second][$third][$oid] = $value; }