From b168f5a9c57545f0a1d937c22f741712f85bcaa0 Mon Sep 17 00:00:00 2001 From: Tom Laermans Date: Sun, 31 Jan 2010 13:49:08 +0000 Subject: [PATCH] poll quagga on all unices, load device list into memory first git-svn-id: http://www.observium.org/svn/observer/trunk@751 61d68cd4-352d-0410-923a-c4978735b2b8 --- discovery.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/discovery.php b/discovery.php index 5f54b6e98..c39e9c3c4 100755 --- a/discovery.php +++ b/discovery.php @@ -74,7 +74,11 @@ $devices_discovered = 0; $device_query = mysql_query("SELECT * FROM `devices` WHERE status = '1' $where ORDER BY device_id DESC"); while ($device = mysql_fetch_array($device_query)) { + $devices[] = $device; +} +foreach ($devices as $device) +{ echo($device['hostname'] . " ".$device['device_id']." ".$device['os']." "); if($os_groups[$device['os']]) {$device['os_group'] = $os_groups[$device['os']]; echo "(".$device['os_group'].")";} echo("\n"); @@ -118,7 +122,7 @@ while ($device = mysql_fetch_array($device_query)) { if ($device['type'] == "unknown") { $device['type'] = 'network'; } # FIXME: could also be a Netscreen... } - if ($device['os'] == "linux") + if ($device['os_group'] == "unix") { # Also discover quagga peers include("includes/discovery/bgp-peers.php");