mirror of
				https://github.com/librenms/librenms.git
				synced 2024-10-07 16:52:45 +00:00 
			
		
		
		
	fixes
git-svn-id: http://www.observium.org/svn/observer/trunk@249 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
		| @@ -43,7 +43,8 @@ | ||||
|         } | ||||
|         $int_exists[] = "$ifIndex"; | ||||
|       } else {  | ||||
|           # Ignored ifName | ||||
|           # Ignored Interface | ||||
| 	  echo("$if \n"); | ||||
|           echo("X");  | ||||
|       } | ||||
|     }  | ||||
|   | ||||
							
								
								
									
										23
									
								
								map.php
									
									
									
									
									
								
							
							
						
						
									
										23
									
								
								map.php
									
									
									
									
									
								
							| @@ -15,7 +15,7 @@ $linkdone = array(); | ||||
|  | ||||
| $x = 1; | ||||
|  | ||||
| $loc_sql = "SELECT * FROM links AS L, interfaces AS I, interfaces AS X, devices as D WHERE I.device_id = D.device_id AND L.src_if = I.interface_id AND D.hostname LIKE '%vostron.net' AND D.hostname NOT LIKE 'cust.vostron.net' GROUP BY D.location ORDER BY D.device_id ASC"; | ||||
| $loc_sql = "SELECT * FROM links AS L, interfaces AS I, interfaces AS X, devices as D WHERE I.device_id = D.device_id AND L.src_if = I.interface_id GROUP BY D.location ORDER BY D.device_id ASC"; | ||||
| $loc_result = mysql_query($loc_sql); | ||||
| while($loc_data = mysql_fetch_array($loc_result)) { | ||||
|  | ||||
| @@ -24,12 +24,7 @@ while($loc_data = mysql_fetch_array($loc_result)) { | ||||
|   style=filled; | ||||
|   color=lightgrey;\n\n"); | ||||
|      | ||||
|   if($loc_data['location'] == "TFM3, Telehouse North, London") { | ||||
|     echo("  \"Internet\" [shape=tripleoctagon style=filled fillcolor=crimson]\n");  | ||||
|     echo("  \"ADSL\" [shape=tripleoctagon style=filled fillcolor=orange]\n"); | ||||
|   } | ||||
|  | ||||
|   $dev_sql = "SELECT * FROM links AS L, interfaces AS I, interfaces AS X, devices as D WHERE D.location = '" . $loc_data['location'] . "' AND I.device_id = D.device_id AND L.src_if = I.interface_id AND D.hostname LIKE '%vostron.net' AND D.hostname NOT LIKE '%cust.vostron.net' GROUP BY D.hostname"; | ||||
|   $dev_sql = "SELECT * FROM links AS L, interfaces AS I, interfaces AS X, devices as D WHERE D.location = '" . $loc_data['location'] . "' AND I.device_id = D.device_id AND L.src_if = I.interface_id GROUP BY D.hostname"; | ||||
|   $dev_result = mysql_query($dev_sql); | ||||
|   while($dev_data = mysql_fetch_array($dev_result)) { | ||||
| 	$host = $dev_data['hostname']; | ||||
| @@ -48,7 +43,7 @@ while($loc_data = mysql_fetch_array($loc_result)) { | ||||
|  | ||||
|   } | ||||
|  | ||||
|   $links_sql = "SELECT *, X.ifDescr AS sif, I.ifDescr AS dif FROM links AS L, interfaces AS I, interfaces AS X, devices as D, devices as Y WHERE D.hostname LIKE '%vostron.net' AND I.device_id = D.device_id AND X.device_id = Y.device_id AND D.hostname NOT LIKE '%cust%' AND Y.hostname NOT LIKE '%cust%' AND L.src_if = I.interface_id AND X.interface_id = L.dst_if  AND D.location = '" . $loc_data['location'] . "' AND  D.location = Y.location ORDER BY D.location DESC"; | ||||
|   $links_sql = "SELECT *, X.ifDescr AS sif, I.ifDescr AS dif FROM links AS L, interfaces AS I, interfaces AS X, devices as D, devices as Y  WHERE I.device_id = D.device_id AND X.device_id = Y.device_id AND L.src_if = I.interface_id AND X.interface_id = L.dst_if  AND D.location = '" . $loc_data['location'] . "' AND  D.location = Y.location ORDER BY D.location DESC"; | ||||
|   $links_result = mysql_query($links_sql); | ||||
|   while($link_data = mysql_fetch_array($links_result)) { | ||||
|  | ||||
| @@ -104,13 +99,13 @@ echo("\n}\n"); | ||||
|  | ||||
| } | ||||
|  | ||||
| echo("\"thnlon-pe01\" -> \"thelon-cs01\" [ arrowhead=none arrowtail=none color=navyblue weight=5 style=\"setlinewidth(8)\"];\n"); | ||||
| echo("\"thnlon-pe01\" -> \"thelon-cs02\" [ arrowhead=none arrowtail=none color=navyblue weight=5 style=\"setlinewidth(8)\"];\n"); | ||||
| #echo("\"thnlon-pe01\" -> \"thelon-cs01\" [ arrowhead=none arrowtail=none color=navyblue weight=5 style=\"setlinewidth(8)\"];\n"); | ||||
| #echo("\"thnlon-pe01\" -> \"thelon-cs02\" [ arrowhead=none arrowtail=none color=navyblue weight=5 style=\"setlinewidth(8)\"];\n"); | ||||
|  | ||||
| echo("\"Internet\" -> \"thelon-pe01\" [ arrowhead=none arrowtail=none color=navyblue weight=5 style=\"setlinewidth(8)\"];\n"); | ||||
| echo("\"Internet\" -> \"thelon-pe02\" [ arrowhead=none arrowtail=none color=navyblue weight=5 style=\"setlinewidth(8)\"];\n"); | ||||
| echo("\"Internet\" -> \"thnlon-pe01\" [ arrowhead=none arrowtail=none color=navyblue weight=5 style=\"setlinewidth(8)\"];\n"); | ||||
| echo("\"ADSL\" -> \"thnlon-pe01\" [ arrowhead=none arrowtail=none color=navyblue weight=5 style=\"setlinewidth(8)\"];\n"); | ||||
| #echo("\"Internet\" -> \"thelon-pe01\" [ arrowhead=none arrowtail=none color=navyblue weight=5 style=\"setlinewidth(8)\"];\n"); | ||||
| #echo("\"Internet\" -> \"thelon-pe02\" [ arrowhead=none arrowtail=none color=navyblue weight=5 style=\"setlinewidth(8)\"];\n"); | ||||
| #echo("\"Internet\" -> \"thnlon-pe01\" [ arrowhead=none arrowtail=none color=navyblue weight=5 style=\"setlinewidth(8)\"];\n"); | ||||
| #echo("\"ADSL\" -> \"thnlon-pe01\" [ arrowhead=none arrowtail=none color=navyblue weight=5 style=\"setlinewidth(8)\"];\n"); | ||||
|  | ||||
| $links_sql = "SELECT *, X.ifDescr AS sif, I.ifDescr AS dif FROM links AS L, interfaces AS I, interfaces AS X, devices as D, devices as Y WHERE D.hostname LIKE '%vostron.net' AND I.device_id = D.device_id AND X.device_id = Y.device_id AND D.hostname NOT LIKE '%cust%' AND L.src_if = I.interface_id AND X.interface_id = L.dst_if  AND D.location != Y.location AND D.hostname NOT LIKE '%cust.vostron.net' AND Y.hostname NOT LIKE '%cust.vostron.net' ORDER BY D.location DESC"; | ||||
| $links_result = mysql_query($links_sql); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user