Updated to disable auto-discovery by ip

This commit is contained in:
laf
2015-10-20 16:12:03 +00:00
parent 9c5decb47d
commit 76f862fddd
3 changed files with 13 additions and 0 deletions

View File

@ -261,6 +261,11 @@ $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.
#### Email configuration
> You can configure these options within the WebUI now, please avoid setting these options within config.php

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

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");