Autodiscovery by IP

I have yet to get autodiscovery using IP to work. This is a new install of LibreNMS.
I have edited config.php setting snmp community = array. Had an issue with that using multiple lines for different communities per the docs so for now just have one line with the predominant community.
I have set [‘nets’] for the allowed networks and set the following;
// Autodiscovery Settings
$config[‘autodiscovery’][‘xdp’] = false;
// Autodiscover hosts via discovery protocols
$config[‘autodiscovery’][‘ospf’] = false;
// Autodiscover hosts via OSPF
$config[‘autodiscovery’][‘bgp’] = false;
// Autodiscover hosts via BGP
$config[‘autodiscovery’][‘snmpscan’] = false;
// autodiscover hosts via SNMP scanning
$config[‘discover_services’] = false;
// Autodiscover services via SNMP on devices of type “server”
// Networks to exclude from autodiscovery
$config[‘autodiscovery’][‘nets-exclude’][] = ‘’;
$config[‘autodiscovery’][‘nets-exclude’][] = ‘’;
$config[‘autodiscovery’][‘nets-exclude’][] = ‘’;
$config[‘autodiscovery’][‘nets-exclude’][] = ‘’;
$config[‘autodiscovery’][‘nets-exclude’][] = ‘’;
// Autodiscover by IP
$config[‘discovery_by_ip’] = true;
// Set to true if you want to enable auto discovery by IP

I ran snmp-scan -d with a network specified and that worked after I removed the multiple communities. That originally appeared to use only the last community listed.
Still no autodiscover by IP. Server has been running since 12/21. Any ideas?

You need to allow to autodiscovery to discover you have excluded allot discovery modules only thing is allowed is the discovery by ip and all that does allow a device to be added if cant resolve the DNS name it will try with IP.

Also, You need to specify a network and set the SNMP community strings in config.php

If I were I would allow $config[‘autodiscovery’][‘xdp’] = true;

Yes, I have been through that and several posts. I didn’t realize I needed one of them true for it to do the IP discovery. I have set xdp to true and will see what happens next time it trys.



1 Like

Autodiscovery by ip means when the devices are added it uses the IP and not a hostname if one is found.

It does not mean it will scan your IP ranges, that is what is for.

1 Like

Ah, so there is not an automatic scan for devices by say a subnet? If so, unfortunate since I would like it to do a periodic scan for new devices by IP since we do not add everything to dns etc.


Not just by subnet, it would need to be discovered using the following. (From the doc)


You could use with the properly configured subnets in config.php and run a scan on the subnets you have set.

You could always set up a cron to run lldp, etc works great for me though.

1 Like

iam in a similar position as this poster (we dont use DNS, only IPs), and i kept having issues trying to figure out why auto discovery would not work on the IPs ranges/subnets i had defined. Then i found (maybe that should be part of the normal auto discovery, or alteleate an option that can be enabled).

however my question is- is there anyway that LLDP device discovery can be done via the IP address returned via LLDP ? ie (in librenms) my switch sees LLDP data from access points connected to its eth ports, but it tries to scan the APs name (and fails, as we dont use DNS). I know that the devices’ IP address is also in the LLDP packet/data, so id like that to be tried to scan. any what to do this?

tks Additional Options

Discovering devices by IP

By default we don’t add devices by IP address, we look for a reverse dns name to be found and add with that. If this fails and you would like to still add devices automatically then you will need to set $config['discovery_by_ip'] = true;

Is there an easy possibility to add multiple Devices by IP-Range and mapped SNMP Community Settings? And do this as an auto-discovery?

The documentation only tells about CIDR Networks, and does not include mapped SNMP Community

Range 1:
SNMP Version: v2c
Community: community1

Range 2:
SNMP Version: v2c
Community: community2

I prefer to avoid not to access Devices with wrong community, or non-networking Devices in the subnet.