Auto Discovery Not Working

Hi, I’m having trouble about Auto Discovery Feature of LIbrenms

I’m Running Librenms with Database server, RRDcached, and single distributed poller. I have few machines in my network installed and configured with SNMPv2. First time i added device manually(as required by manual), and then add more device by running ./ But then i realize that a single device can’t be added by auto discovery(either by running ./discovery.php -h new manually and running ./ What did went wrong? Please help me

Update :
Turn out i was able to discover my device by running ./ but i’m still not be able to discover device through running ./discovery.php -h new manually nor automatically by cron

How do you have auto-discovery setup? Keep in mind auto discovery only runs every 6 hours or depending on when you added the device.

Did you configure SNMP?

Did you configure the nets its supposed to scan?

also if you don’t fqdn for your device I would suggest enabling this
$config['discovery_by_ip'] = true;

Thanks for the response :blush:
I added these lines to the config.php :

$config[‘snmp’][‘community’][] = “public”;

$config[‘nets’][] = ‘’;
$config[‘nets’][] = ‘’;
$config[‘nets’][] = ‘’;

$config[‘discovery_by_ip’] = true;
$config[‘discovery_modules’][‘discovery-arp’] = 1;
$config[‘discovery_modules’][‘ipv4-addresses’] = 1;
$config[‘discovery_modules’][‘ipv6-addresses’] = 1;
$config[‘discovery_modules’][‘ports’] = 1;
$config[‘discovery_modules’][‘services’] = 1;
$config[‘allow_duplicate_sysName’] = true;

I already configured snmp on some device, i waited 24 hours but there is still no device added. Then i tried to run ./ and all devices added!
./validate.php says discovery.php hasn’t run in 24 hours. Here’s my cron.d/librenms :

33 */6 * * * librenms /opt/librenms/discovery.php -h all >> /dev/null 2>&1
33 */6 * * * librenms /opt/librenms/ 1 >> /dev/null 2>&1
*/5 * * * * librenms /opt/librenms/discovery.php -h new >> /dev/null 2>&1
*/5 * * * * librenms /opt/librenms/ 24 >> /opt/librenms/logs/wrapper.log
15 0 * * * librenms /opt/librenms/ >> /dev/null 2>&1
** *** librenms /opt/librenms/alerts.php >> /dev/null 2>&1

What did i miss??

thanks, appreciated :smile:

1 Like

Most of those discovery modules don’t exist, you can’t just add something to the end of discovery_modules and it works.

Please go and re-read the discovery docs.

Okay so i have to remove some module that doesn’t exist then.

But how about this error :
[FAIL] Discovery has not completed in the last 24 hours, check the cron job

Is my cron job experience some error? Or it’s the discovery.php file?

This may be that a device isn’t completing discovery in a quick enough time.

Run this in mysql select hostname, last_discovered from devices; see which device has not been updated in the last 24 hours then run ./discovery.php -h HOSTNAME and see how long it takes.

I saw all of my devices has not been updated in the last 24 hours. It doesn’t work either if i run manually(./discovery.php -h all). Here’s the output if i run ./discovery.php -h

root@poller01:/opt/librenms# ./discovery.php -h
LibreNMS Discovery
SNMP: Get[0/0.00s] Walk [0/0.00s]
MySQL: Cell[0/0.00s] Row[0/0.00s] Rows[3/0.00s] Column[0/0.00s] Update[0/0.00s] Insert[0/0.00s] Delete[0/0.00s]

The devices table from mysql not updated and if i run ./validate.php it still get the Fail error.
So the problem is from the file discovery.php then? How do i fix it??

That means that either you don’t have a device with that hostname or it’s currently down. What does it look like in the webui? Screenshot the overview page?

I’m having the exact same problem.
Did you ever get it fixed?

what you meant by most of discovery modules dont exist? is it that we need to install LLDP module in Linux server where LibreNMS running?