Broken VDSL stats after update

So in LibreNMS, the VDSL port comes in as “type VDSL”, as expected.
The code in includes/polling/ports.inc.php at line 737 makes it so that LibreNMS pulls items such as line attenuation etc etc EVEN when the port is showing as down.

All you need to do to fix this, is apply the same logic you have for ADSL to VDSL.

This is what I changed the file to make this work.

+++ b/includes/polling/ports.inc.php
@@ -737,7 +737,7 @@ foreach ($ports as $port) {
         if (! empty($port['skipped'])) {
             // We don't care about statistics for skipped selective polling ports
             d_echo("$port_id skipped because selective polling ports is set.");
-        } elseif ($port['ifType'] != 'adsl' && $port['ifOperStatus'] == 'down' && $port['ifOperStatus_prev'] == 'down' && $this_port['ifOperStatus'] == 'down' && $this_port['ifLastChange'] == $port['ifLastChange']) {
+        } elseif ($port['ifType'] != 'vdsl' && $port['ifType'] != 'adsl' && $port['ifOperStatus'] == 'down' && $port['ifOperStatus_prev'] == 'down' && $this_port['ifOperStatus'] == 'down' && $this_port['ifLastChange'] == $port['ifLastChange']) {
             // We don't care about statistics for down ports on which states did not change since last polling
             // We still take into account 'adsl' ports that may update speed/noise even if the interface is status down
             d_echo("$port_id skipped because port is still down since last polling.");

@Dave
Could you please send a Pull Request in github to add this change ? That would fix it for everybody.
Thanx

Dumb question…
How do I do that?

I think I’ve done it…

1 Like

Good. It is now merged, so it is already in “master” branch and will be in next stable release.
Thanx for your contribution !

Pulled and updated my instance last night

Many many thanks to all involved!