Skip to content

Commit

Permalink
[Dashboard] Remove verifying the body of the prometheus health check (#…
Browse files Browse the repository at this point in the history
…44429)

This check is too fragile as we've seen:

prometheus change it's health check message with newer versions
Other flavors of prometheus (ex: cortex) has a completely different message.
We simplify the healthcheck to only verify that a 200 response is returned.

Signed-off-by: Alan Guo <[email protected]>
  • Loading branch information
alanwguo authored Apr 3, 2024
1 parent 58c3283 commit 8aeaf6c
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions dashboard/modules/metrics/metrics_head.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,6 @@ async def prometheus_health(self, req):
status=resp.status,
)

text = await resp.text()
# Basic sanity check of prometheus health check schema
# Different flavors of Prometheus may use different health check strings
if "Prometheus" not in text:
return dashboard_optional_utils.rest_response(
success=False,
message="prometheus healthcheck failed.",
status=resp.status,
text=text,
)

return dashboard_optional_utils.rest_response(
success=True,
message="prometheus running",
Expand Down

0 comments on commit 8aeaf6c

Please sign in to comment.