Visualizing a Prometheus type summary in Grafana using InfluxDB

137 Views Asked by At

Using Grafana backed by an InfluxDB data source, how can I visualize the average response times observed by a HTTP client that exposes metrics in a Prometheus style endpoint with a Summary type metric? What I want is a graph that shows the mean response times (sum / count) for a configured interval, say 1 minute.

An example metric from the endpoint looks like this:

http_client_response_time_millis_count{http_client_method="GET",http_client_url="http://localhost:5555/foobar",http_client_response_status_code="200",} 2.0
http_client_response_time_millis_sum{http_client_method="GET",http_client_url="http://localhost:5555/foobar",http_client_response_status_code="200",} 34.0

And in InfluxDB this gets imported to this type of structure:

Screenshot of InfluxDBs Data Explorer view of the measurement

In PromQL I would use the expression rate(http_client_response_time_millis_sum[1m]) / rate(http_client_response_time_millis_count[1m]).

The query needs to be expressed in InfluxQL since this is an existing Grafana + InfluxDB setup that I don't control.

Thanks!

0

There are 0 best solutions below