Ports missing from port list, nonexistent down ports reported, existing ports not in the list

./validate.php output:

Component Version
LibreNMS 1.53.1-17-g394d66a3f
DB Schema 2019_05_30_225937_device_groups_rewrite (135)
PHP 7.2.9-1+b2
MySQL 10.3.15-MariaDB-1
RRDTool 1.7.1
SNMP NET-SNMP 5.7.3

====================================

[OK] Composer Version: 1.8.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

I was messing around with some devices, deleted, then later readded few of them and it seems to have broken the Ports display.

It claims I have 169 ports, 48 up, 5 down, 108 ignored, 8 disabled in the Device Summary dashboard widget, but clicking on the numbers produces wrong results:

  • clicking on the 169 displays 24 entries,
  • clicking on the 48 displays 21 entries,
  • clicking on the 5 displays empty list,
  • clicking on the 108 displays 15 entries,
  • clicking on the 8 displays 3 entries

To me it seems the database doesnā€™t get properly deleted when removing the device, since I can remove all 13 devices, yet the 1st I add after will be device 14 etc. and that somehow messes it up?

Any way to remedy this seeing as the removing and re-adding the devices isnā€™t gonna work as thatā€™s what caused it to happen in the 1st place.

Thanks for any suggestions!

Hi @hugalafutro
Devices IDs are constantly growing, this is expected. IDs are never reused. So the issue here is only with the ports.
The question is to check how many ports are really existing in the devices that are discovered right now, in order to see if the device summary dashboard is right or wrong.

Hi, I tried to reply yesterday but the forum was down.

Do you mean to count the detected ports for each device? Iā€™m not sure how to tell if the ports are detected correctly on my windows machines, because my linux & freebsd boxes show lo, eth0, wlan0 etc as expected, but each windows machine fetches 30+ ports.

Iā€™ll count what ports are in each device once I get home.

Hi @PipoCanaja, so these are the numbers of ports pulled by snmp for each system:

esxi - 3
windows - 33
raspbian - 3
openwrt - 8
rapsbian - 3
raspbian - 3
debian - 2
debian - 2
freebsd - 2
windows - 32
ubuntu - 2
ipmi bmc - 5
windows - 35

apart from the windows machines Iā€™m fairly sure the others have just the ports that they display. The windows machine have scores of interfaces such as on this screenshot https://turbomrak.ddns.net/s/gYsPD8Rk2sPx34Z

The amount of ports was more or less the same before I deleted and re-added some devices, however the main thing is the numbers in the device summary widget added up correctly.

Adding the ports from each device together now gives 133, but the dashboard widget claims I have 169 ports and clicking on the number in dashboard or Ports/All displays 19 ports. It correctly claims I have 113 ignored ports (mostly the windows ports) and clicking on that number in dashboard or Ports/Ignored correctly displays paginated view of 113 ports, but hereā€™s the thing, 19+113 is 132, which still misses 1 port from the 133 that are actually present in the devices and I still have no idea where the 169 comes from.

ā€˜deleted portsā€™ are kept in the DB for some time (in case they are discovered again, you keep historical data etc etc).
You can play with the search here :


Deleted ports are removed by default from the results, unless you explicitely check ā€œDeletedā€. Same with Ignored, and disabled. And even more fun, if they are in the 3 states, you need all checkboxes to be checked to see them :slight_smile:

You can have a look here (librenms/Cleanup-options.md at master Ā· librenms/librenms Ā· GitHub) for help in the cleaning process.

Bye

1 Like