Grafana not getting the data from prometheus

Grafana is getting empty result from Prometheus. But for the same “metric” prometheus responds with data.
There is not connectivity issue as am getting proper result for other metrics.

Query - aws_elb_httpcode_backend_2_xx_sum

Grafana Request - https://XYZ/api/v1/query_range?query=aws_elb_httpcode_backend_2_xx_sum&start=1519028103&end=1519031008&step=30
Response - {“status”:“success”,“data”:{“resultType”:“matrix”,“result”:[]}}

I have tried rate() sum() around the query but always get empty result.

Grafana - 4.6.3
Prometheus - 2.1.0


  • Make sure there’s data for the time span you’re looking at. That one got me good yesterday.
  • Maybe try to simplify the math - don’t do rate() or sum().

I had this today. For me the issue was resolved by setting the time parameter explicitly. Also ensuring it was not more precise than a whole second.