Hello,
we are facing problems with the function “autodiscovery_by_ip” within the autodiscovery setup.
Our Setup:
Librenms on Ubuntu 24.04 LTS, installed via:
And set up the autodiscovery:
Added one Switch, 10.133.0.251, which is an Aruba CX6100 24Port, running on firmware “ArubaOS-CX PL.10.16.1010”
The Switch is connected to a Ruckus ICX Switch (IP 10.133.0.250, named sw01) and another Aruba CX 6100 (IP 10.133.0.254, named sw04). Please keep this order of interfaces in mind, it will be important later in this post!
–
But when the discovery_wrapper.py ran, there was no new device added.The log told us:
LLDP discovery of sw01 failed - Check name lookup and
LLDP discovery of sw04 failed - Check name lookup
The IP was not found while the script was running.
–
I jumped deeper in it and found two problems:
The line 276 in the php-script:
includes/discovery/discovery-protocols.inc.php
$res = preg_match("/1\.0\.8802\.1\.1\.2\.1\.4\.2\.1\.3\.([^\.]*)\.([^\.]*)\.([^\.]*)\.([^\.]*)\.([^\.]*).(([^\.]*)(\.([^\.]*))+)/", (string) $key, $matches);
uses “$key”, this seems to be filled with the wrong data.
I used “$value” instead and found more usable data.
$res = preg_match("/1\.0\.8802\.1\.1\.2\.1\.4\.2\.1\.3\.([^\.]*)\.([^\.]*)\.([^\.]*)\.([^\.]*)\.([^\.]*).(([^\.]*)(\.([^\.]*))+)/", (string) $value, $matches);
(but have not checked deeply…)
2.:
in the same line 276 the regex for extracting the IP address from the snmp walk two lines above fails.
Using the CLI with the parameters of line 274:
/usr/bin/snmpbulkwalk -M /opt/librenms/mibs:/opt/librenms/mibs/arubaos-cx -m SNMPv2-TC:SNMPv2-MIB:IF-MIB:IP-MIB:TCP-MIB:UDP-MIB:NET-SNMP-VACM-MIB -v2c -c public -OQXUte -Pu -Os -On udp:10.133.0.251:161 .1.0.8802.1.1.2.1.4.2.1.3
The output is:
.1.0.8802.1.1.2.1.4.2.1.3.696.25.1.1.4.10.133.0.250 = 2
.1.0.8802.1.1.2.1.4.2.1.3.696.26.9.1.4.10.133.0.254 = 2
Using the regex from the discovery-protocols.inc.php, line 276, gives us this result (checked with https://regex101.com/) :
Regex original:
/1.0.8802.1.1.2.1.4.2.1.3.([^.]).([^.]).([^.]).([^.]).([^.]).(([^.])(.([^.]*))+)/
result 10.133.0.250 = 2
But the script is not able to use “= 2” and ignores it.
No IP to discover, the script tries DNS instead.
My workarround, I have changed the regex to:
/1.0.8802.1.1.2.1.4.2.1.3.([^.]).([^.]).([^.]).([^.]).([^.]).(([^.])(.([^.]*))[^\s]+)/
and the result is 10.133.0.250 (without “= 2”)
With both changes, “$value” and the regex, the script finds the IP for the first device in the LLDP list and add it to the device list… but ONLY the first.
Device 10.133.0.250 (10.133.0.250) (port 1/1/25) autodiscovered through LLDP on 10.133.0.251
As you see in my description of the setup, the second LLDP neighbour is the Aruba-CX. This switch was not added. The script stopps after the first entry - Havn’t found a reason until now…
Any help is highly appreciated!
I will post the output of ./discovery.php -h HOSTNAME -d | curl --data-binary @- ``https://paste.rs``/ next monday, I am off the next days.
Regards
Chris
–
And additional the output of ./validate.php:
librenms@librenms-2601:~$ ./validate.php
| Component | Version |
|----|----|
| LibreNMS | 26.2.1-dev.32+95c778d50 (2026-01-18T23:41:42+01:00) |
| DB Schema | 2026_01_18_221501_cefpunt2host_changes (364) |
| PHP | 8.3.6 |
| Python | 3.12.3 |
| Database | MariaDB 10.11.13-MariaDB-0ubuntu0.24.04.1 |
| RRDTool | 1.7.2 |
| SNMP | 5.9.4.pre2 |
| =========================================== | |
[OK] Composer Version: 2.9.3
[OK] Dependencies up-to-date.
[OK] Database Connected
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQL and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok
[WARN] Your install is over 24 hours out of date, last update: Sun, 18 Jan 2026 22:41:42 +0000
[FIX]:Make sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors.
[WARN] Your local git contains modified files, this could prevent automatic updates.
[FIX]:You can fix this with ./scripts/github-removeModified Files:includes/discovery/discovery-protocols.inc.phplibrenms@librenms-2601:~$