Grafana + Prometheus

Hi,

I use docker-compose and all looks good, I can log in and see everything grafana and prometheus
but the two cannot communicate.
In the datasource for prometheus I get a
“HTTP Error Bad Request” message (without further detail)
error when pressing save&test and

in the dashboard all graphs has an error:
“invalid parameter ‘start’: cannot parse “” to a valid timestamp”

In the explorer I get
“invalid parameter ‘query’: 1:1: parse error: no expression found in input”
for whatever query.

How can I debug what could be wrong?

This in the CLI e.g. return a result that looks normal:
curl ‘http://172.23.0.4:9090/api/v1/query?query=up

versions
Grafana v6.7.2 (423a25fc32)
Prometheus: v2.17.1

2 Likes

Not sure why/how it is related. But in my case it was the trickster which caused the problem. Once I directed the datasource directly to the prometheus. It seems to solve the problem

Getting the same issue.
Have you solved it?

Had the same issue trying to access the gitlab Prometheus service from a Grafana instance in Kubernetes (observability helm chart). I solved it by changing the HttpMethod from POST to GET in the Data Source configuration.