Extend filtering of graphs device_bits on cisco ASA (#14796)

* Extend filtering for device_bits for cisco ASA

* Style
This commit is contained in:
PipoCanaja
2023-01-24 11:15:59 -06:00
committed by GitHub
parent 040ebcf917
commit c2b0a6ed80
+5 -4
View File
@@ -15,10 +15,11 @@ foreach ($ports as $port) {
$ignore = 0;
if (is_array(\LibreNMS\Config::get('device_traffic_iftype'))) {
foreach (\LibreNMS\Config::get('device_traffic_iftype') as $iftype) {
if ($iftype == '/l2vlan/' && $device['os'] == 'asa') {
// ASA (at least in multicontext) reports all interfaces as l2vlan even if they are l3
// so every context has no graph displayed unless l2vlan are accepted for all.
// This patch will ignore l2vlan for ASA.
if (in_array($iftype, ['/virtual/', '/l2vlan/']) && $device['os'] == 'asa') {
// ASA (at least in multicontext) reports interfaces as l2vlan even if they are l3
// or propVirtual in 9.16 (like etherchannels) but without the physical ones.
// Filtering those types results in empty device_bits graphs in ASAs.
// This patch will avoid filtering l2vlan and propVirtual on ASA devices.
continue;
}
if (preg_match($iftype . 'i', $port['ifType'])) {