includes/polling/ports.inc.php
File ports.inc.php
has 716 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
use LibreNMS\Config;
use LibreNMS\Enum\PortAssociationMode;
use LibreNMS\RRD\RrdDefinition;
Consider simplifying this complex logical expression. Open
Open
if ($port_tune == 'true' ||
($device_tune == 'true' && $port_tune != 'false') ||
(Config::get('rrdtool_tune') == 'true' && $port_tune != 'false' && $device_tune != 'false')) {
if ($oid == 'ifSpeed') {
$tune_port = true;
Consider simplifying this complex logical expression. Open
Open
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'] != 'vdsl' && $port['ifType'] != 'adsl' && $port['ifOperStatus'] == 'down' && $port['ifOperStatus_prev'] == 'down' && $this_port['ifOperStatus'] == 'down' && ($this_port['ifLastChange'] ?? null) == $port['ifLastChange']) {
// We don't care about statistics for down ports on which states did not change since last polling
FIXME found Open
Open
// FIXME we probably shouldn't be doing this from the VTP MIB, right?
- Exclude checks
FIXME found Open
Open
// FIXME use $q_bridge_mib[$this_port['ifIndex']] to see if it is a trunk (>1 array count)
- Exclude checks