cloudkitty/releasenotes/notes/prometheus-error-8eab9f1793c2280c.yaml
Pierre Riteau a536880431 Raise CollectError when Prometheus query returns an error
As described in the Prometheus HTTP API documentation [1], the JSON
response to a Prometheus query includes a status field, which was
ignored by CloudKitty. If it is set to "error", raise a CollectError
exception to log the error type and details.

For example, a query with a metric name containing a dot will produce
the following error:

    cloudkitty.collector.exceptions.CollectError: bad_data: invalid parameter "query": 1:25: parse error: unexpected character: '.'

[1] https://prometheus.io/docs/prometheus/latest/querying/api/

Change-Id: I0c2892a39ec50163de251b38d34493db6a22c858
Story: 2009869
Task: 44564
2022-02-22 12:13:37 +01:00

6 lines
129 B
YAML

---
fixes:
- |
Raises a ``CollectError`` exception with error details when a Prometheus
query returns an error status.