Merge pull request #2182 from laf/issue-2105

Updated to disable auto-discovery by ip
This commit is contained in:
Mike Rostermund
2015-10-26 21:59:06 +01:00
3 changed files with 14 additions and 0 deletions
+6
View File
@@ -261,6 +261,12 @@ $config['autodiscovery']['nets-exclude'][] = "240.0.0.0/4";
```
Arrays of subnets to exclude in auto discovery mode.
```php
$config['discovery_by_ip'] = true;
```
Enable auto discovery by IP. By default we only discover based on hostnames but manually adding by IP is allowed.
Please note this could lead to duplicate devices being added based on IP, Hostname or sysName.
#### Email configuration
> You can configure these options within the WebUI now, please avoid setting these options within config.php
+2
View File
@@ -215,6 +215,8 @@ $config['autodiscovery']['nets-exclude'][] = '127.0.0.0/8';
$config['autodiscovery']['nets-exclude'][] = '169.254.0.0/16';
$config['autodiscovery']['nets-exclude'][] = '224.0.0.0/4';
$config['autodiscovery']['nets-exclude'][] = '240.0.0.0/4';
// Autodiscover by IP
$config['discovery_by_ip'] = false;// Set to true if you want to enable auto discovery by IP.
$config['alerts']['email']['enable'] = false;
// Enable email alerts
+6
View File
@@ -34,6 +34,12 @@ function discover_new_device($hostname, $device='', $method='', $interface='') {
return false;
}
}
else {
if ($config['discovery_by_ip'] === false) {
d_echo('Discovery by IP disabled, skipping ' . $dst_host);
return false;
}
}
d_echo("ip lookup result: $ip\n");