PureStorage-OpenConnect / pure-exporter

Prometheus exporter for Pure Storage FlashArray and FlashBlade. DEPRECATED IN FAVOR OF FA AND FB OPENMETRICS EXPORTERS
Apache License 2.0
29 stars 20 forks source link

get_network_interfaces KeyError #59

Closed klaska-lukas closed 1 year ago

klaska-lukas commented 2 years ago

File "/home/lk130f/pure_exporter/flasharray_collector/flasharray_metrics/network_interface_metrics.py", line 32, in _performance self.fa.get_network_interfaces(), File "/home/lk130f/pure_exporter/flasharray_collector/flasharray_metrics/flasharray.py", line 185, in get_network_interfaces nicdict[n['name']].update(n) KeyError: 'ct0.eth18'

The function get_network_interfaces fails for flasharray configured with bond interfaces. Bond interface is defined with this dict: {'subnet': None, 'name': 'bond3', 'address': None, 'enabled': True, 'mtu': 9000, 'hwaddr': '92:7a:9f:23:3c:4d', 'netmask': None, 'slaves': ['ct0.eth18', 'ct0.eth19'], 'services': ['iscsi'], 'speed': 50000000000, 'gateway': None}

nicdict key (n['name']) is bond3 but the performance metric are reported under ct0.eth18/19 names, therefore an error is returned when nicdict update is called.

sdodsley commented 2 years ago

@klaska-lukas this exporter (for FlashArrays) has been dprecated in favour of an enhanced OpenMetrics exporter. Please use this new exporter and see if it resolves your issue: https://github.com/PureStorage-OpenConnect/pure-fa-openmetrics-exporter