diff --git a/discovery.php b/discovery.php index c5c451a4a0..9d72bafe58 100755 --- a/discovery.php +++ b/discovery.php @@ -52,6 +52,9 @@ while ($device = mysql_fetch_array($device_query)) { if($os_groups[$device[os]]) {$device['os_group'] = $os_groups[$device[os]]; echo "(".$device['os_group'].")";} echo("\n"); + ## Discover OS Changes + include("includes/discovery/os.inc.php"); + ## Discover Interfaces include("includes/discovery/interfaces.php"); diff --git a/includes/discovery/bgp-peers.php b/includes/discovery/bgp-peers.php index ae88d525a1..c8daa67b48 100755 --- a/includes/discovery/bgp-peers.php +++ b/includes/discovery/bgp-peers.php @@ -12,7 +12,7 @@ echo("AS$bgpLocalAs "); - if($bgpLocalAs != $device['bgpLocalAs']) { mysql_query("UPDATE devices SET bgpLocalAs = '$bgpLocalAs' WHERE device_id = '".$device['device_id']."'"); echo("Updated AS\n"); } + if($bgpLocalAs != $device['bgpLocalAs']) { mysql_query("UPDATE devices SET bgpLocalAs = '$bgpLocalAs' WHERE device_id = '".$device['device_id']."'"); echo("Updated AS "); } $peers_cmd = $config['snmpwalk'] . " -m BGP4-MIB -CI -Oq -" . $device['snmpver'] . " -c" . $device['community'] . " " . $device['hostname'].":".$device['port'] . " "; $peers_cmd .= "BGP4-MIB::bgpPeerRemoteAs"; @@ -67,7 +67,7 @@ } else { echo("No BGP on host"); if($device['bgpLocalAs']) { - mysql_query("UPDATE devices SET bgpLocalAs = NULL WHERE device_id = '".$device['device_id']."'"); echo(" (Removed ASN)\n"); + mysql_query("UPDATE devices SET bgpLocalAs = NULL WHERE device_id = '".$device['device_id']."'"); echo(" (Removed ASN) "); } # End if } # End if diff --git a/includes/discovery/os.inc.php b/includes/discovery/os.inc.php new file mode 100644 index 0000000000..a6794aa17d --- /dev/null +++ b/includes/discovery/os.inc.php @@ -0,0 +1,12 @@ + $os')"); + $device['os'] = $os; + } + +?> diff --git a/includes/discovery/storage.php b/includes/discovery/storage.php index 106c1c8ec8..eb6edbfdbe 100755 --- a/includes/discovery/storage.php +++ b/includes/discovery/storage.php @@ -17,7 +17,7 @@ list($units) = explode(" ", $units); $allow = 1; foreach($config['ignore_mount'] as $bi) { if($bi == $descr) { $allow = 0; } } - foreach($config['ignore_mount_string'] as $bi) { if(strpos($descr, $bi) !== FALSE) { $allow = 0; } else { echo("$descr -> $bi \n"); } } + foreach($config['ignore_mount_string'] as $bi) { if(strpos($descr, $bi) !== FALSE) { $allow = 0; } } foreach($config['ignore_mount_regexp'] as $bi) { if(preg_match($bi, $descr)) { $allow = 0; } } $descr = str_replace("mounted on: ", "", $descr); $descr = str_replace(": var file system", "", $descr);