Merge "Fix empty metadata exception in Prometheus collector"
This commit is contained in:
commit
15e88c8c3a
|
@ -130,7 +130,7 @@ class PrometheusCollector(collector.BaseCollector):
|
|||
"""
|
||||
metadata = {}
|
||||
for meta in self.conf[metric_name]['metadata']:
|
||||
metadata[meta] = data['metric'][meta]
|
||||
metadata[meta] = data['metric'].get(meta, '')
|
||||
|
||||
groupby = {scope_key: scope_id}
|
||||
for meta in self.conf[metric_name]['groupby']:
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
issues:
|
||||
- |
|
||||
Fixes exceptions in Prometheus collector when metadata defined in
|
||||
``metrics.yml`` is not present on metrics retrieved from Prometheus.
|
Loading…
Reference in New Issue