fix: FIX fiIFIxiIXIFiIXi

This commit is contained in:
dettlaff 2024-07-25 00:58:38 +04:00
parent df4a20ebf7
commit 6f18eefc25

View file

@ -33,13 +33,11 @@ class PrometheusQueries:
"step": step, "step": step,
}, },
) )
print(response)
if response.status_code != 200: if response.status_code != 200:
raise Exception("Prometheus returned unexpected HTTP status code") raise Exception("Prometheus returned unexpected HTTP status code")
json = response.json() json = response.json()
print(json)
return PrometheusQueryResult( return PrometheusQueryResult(
result_type=json["resultType"], result=json["result"] result_type=json["data"]["resultType"], result=json["data"]["result"]
) )
except Exception as error: except Exception as error:
raise Exception("Prometheus request failed! " + str(error)) raise Exception("Prometheus request failed! " + str(error))