I’m setting up my first dashboard with a Singlestat panel. My data source is a Prometheus server. The metric to be shown is a simple “healthcheck”, i.e. the metric delivers a 0.0 if the endpoint is down and a 1.0 if the endpoint is up.
Here’s the configuration of the panel:
The problem is that I need to manually refresh the dashboard (or edit some options in the query). Only then the Singlestat panel shows the correct current value. The metric itself delivers the correct value. The query inspector also shows the correct data but it seems as if this is because opening the query inspector triggers a reload.
If I don’t trigger any update I can wait for “hours” but the panel does not reflect the current value.
Here’s the output of the query inspector:
{
"xhrStatus": "complete",
"request": {
"method": "GET",
"url": "api/datasources/proxy/1/api/v1/query?query=myproject_health_check_frontend&time=1557064692"
},
"response": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"instance": "host.docker.internal:8090",
"job": "myproject"
},
"value": [
1557064692,
"1"
]
}
]
}
}
}