I run with the poller service, not the crontab.
I have a Dev server running Librenms and I want to limit the number of devices it polls.
I configured the config.php files with the following:
$config[‘poller_service_discover_frequency’] = 86400;
$config[‘discovery_by_ip’] = FALSE;
$config[‘discovery_modules’][‘route’] = 0;
$config[‘discovery_modules’][‘discovery-arp’] = 0;
$config[‘autodiscovery’][‘xdp’] = FALSE; // Autodiscover hosts via CDP and LLDP
$config[‘autodiscovery’][‘ospf’] = FALSE; // Autodiscover hosts via OSPF
$config[‘autodiscovery’][‘bgp’] = FALSE; // Autodiscover hosts via iBGP
$config[‘autodiscovery’][‘snmpscan’] = FALSE;
$config[‘discover_services’] = FALSE;
$config[‘autodiscovery’][‘ip_nets’] = “10.1.0.1/32”; // only line on ip_nets
$config[‘autodiscovery’][‘nets-exclude’][] = ‘192.168.0.0/16’;
$config[‘autodiscovery’][‘nets-exclude’][] = ‘172.16.0.0/12’;
$config[‘autodiscovery’][‘nets-exclude’][] = ‘10.0.0.0/8’;
Every night it discovers and adds a whole bunch of devices that I deleted the previous day.
in the librenms log I see theses discovery been added:
/var/www/librenms/discovery.php new 2017-07-18 04:10:01 - 0 devices discovered in 0.006 secs
/var/www/librenms/discovery.php new 2017-07-18 04:15:01 - 0 devices discovered in 0.007 secs
/var/www/librenms/discovery.php new 2017-07-18 04:20:01 - 0 devices discovered in 0.005 secs
/var/www/librenms/discovery.php new 2017-07-18 04:25:01 - 0 devices discovered in 0.006 secs
/var/www/librenms/discovery.php new 2017-07-18 04:30:02 - 0 devices discovered in 0.007 secs
/var/www/librenms/discovery.php 1200 2017-07-18 04:33:02 - 0 devices discovered in 0.080 secs
/var/www/librenms/discovery.php 1772 2017-07-18 04:33:11 - 1 devices discovered in 9.251 secs
/var/www/librenms/discovery.php 7013 2017-07-18 04:33:15 - 1 devices discovered in 12.73 secs
/var/www/librenms/discovery.php 2208 2017-07-18 04:33:15 - 1 devices discovered in 3.230 secs
/var/www/librenms/discovery.php 7109 2017-07-18 04:33:15 - 1 devices discovered in 13.24 secs
/var/www/librenms/discovery.php 7002 2017-07-18 04:33:16 - 1 devices discovered in 13.34 secs
/var/www/librenms/discovery.php 6720 2017-07-18 04:33:17 - 1 devices discovered in 14.93 secs
/var/www/librenms/discovery.php 7129 2017-07-18 04:33:17 - 1 devices discovered in 15.39 secs
I have about 1400 devices that were discovered at one time, but I deleted most of them to have only about 50-100 has this is the Dev server.
Any help appreciated.