mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
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:
+5
-2
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user