canonical / prometheus-openstack-exporter

OpenStack exporter for the prometheus monitoring system
GNU General Public License v3.0
128 stars 113 forks source link

Latest p-o-e crashes with enabled_collectors #80

Closed hloeung closed 5 years ago

hloeung commented 5 years ago

Hi,

Seems the latest p-o-e is crashing.

Aug 12 01:08:04 comet prometheus-openstack-exporter.prometheus-openstack-exporter[48365]: Traceback (most recent call last): Aug 12 01:08:04 comet prometheus-openstack-exporter.prometheus-openstack-exporter[48365]: File "/snap/prometheus-openstack-exporter/27/bin/prometheus-openstack-exporter", line 780, in Aug 12 01:08:04 comet prometheus-openstack-exporter.prometheus-openstack-exporter[48365]: if data_gatherer_needed(config): Aug 12 01:08:04 comet prometheus-openstack-exporter.prometheus-openstack-exporter[48365]: File "/snap/prometheus-openstack-exporter/27/bin/prometheus-openstack-exporter", line 717, in data_gatherer_needed Aug 12 01:08:04 comet prometheus-openstack-exporter.prometheus-openstack-exporter[48365]: return set(config['enabled_collectors']).intersection(DATA_GATHERER_USERS) Aug 12 01:08:04 comet prometheus-openstack-exporter.prometheus-openstack-exporter[48365]: KeyError: 'enabled_collectors'

hloeung commented 5 years ago

Looks to be related to commit 662b70fa

hloeung commented 5 years ago

I think, for backwards compatibility, if enabled_collectors isn't defined, then add the ones previously - so all of them plus the data gatherer.