new funky discovery stuff (autodiscovery works now for discovery protocols)

git-svn-id: http://www.observium.org/svn/observer/trunk@2460 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-09-14 17:26:59 +00:00
parent b2cd75c55f
commit fb5d8b398f
9 changed files with 173 additions and 93 deletions
+5 -2
View File
@@ -41,14 +41,17 @@ if (isset($argv[1]) && $argv[1])
}
if (!$snmpver) $snmpver = "v2c";
if ($community)
{
unset($config['snmp']['community']);
$config['snmp']['community'][] = $community;
}
$device_id = addHost($host, $community, $snmpver, $port = '161', $transport = 'udp');
addHost($host, $community, $snmpver, $port = '161', $transport = 'udp');
if($device_id) {
$device = device_by_id_cache($device_id);
echo("Added device ".$device['hostname']." (".$device['device_id'].")\n");
}
} else {