wobcom/Cisco-Exporter

add filter for per vlan traffic

Closed this issue · 0 comments

At the moment it is not possible to apply filters to the "vlan" collector. It is alway scraping all configured vlans. On devices with many vlans configured, this can significantly increase scrape time. For that purpose it would be nice to configure filters, equivalent to the existing interface filters.

When you run the command show vlans, that is used right now, the cisco is returning all vlans and their counters. A filter can be applied by adding the vlan id to that command: show vlans 123 returns the information in the same format, but only for a single vlan. It is not possible to stack vlan ids behind the command like: show vlans 123,456,789 which means that it is necessary to run the command 3 times for these 3 vlans:

show vlans 123
show vlans 456
show vlans 789

Example output:

IRAI0009#show vlans 123

VLAN ID: 123 (IEEE 802.1Q Encapsulation)

   Protocols Configured:          Received:        Transmitted:
                     IP     34953545566259      16630772153406
                   CLNS          151610998                   0
                   IPv6     14775377238025       5192128261015

VLAN trunk interfaces for VLAN ID 123:
Port-channel1.123

Port-channel1.123 (181)

                     IP: 192.0.2.0
                   CLNS:
                   IPv6: 2001:DB8::1

      Total 49731165015437 packets, 64415719029126907 bytes input
      Total 21822920422489 packets, 5862246749349065 bytes output
No subinterface configured with ISL VLAN ID 123