Greetings,
Grafana Versions: Ubuntu Linux, self hosted, Grafana 10.4.2
I am trying to build either a histogram or a bar gauge that will display the values of each bucket in order. My data source is an application being scraped into Prometheus at interval. This is what the data in Prometheus looks like:
query:
http_client_duration_milliseconds_bucket{http_method=“POST”,instance=“Server1”,job=“Application1”}
Results:
http_client_duration_milliseconds_bucket{http_flavor=“1.1”, http_method=“POST”, http_scheme=“https”, http_status_code=“200”, instance=“Server1”, job=“Application1”, le=“+Inf”, net_peer_name=“website.domain.com”} 17
(these results repeat for each bucket (le), 0, 10, 100, 1000, 10000, 25, 250, 2500, 5, 50, 500, 5000, 5000, 75, 750, 7500)
The le label appears to be the criteria for the bucket expressed in ms.
When I build this as a Bar Gauge it puts the le’s across the bottom in the order it comes back from Prometheus which I expressed above, which is incorrect. I would like to sort those le buckets (0, 5, 10, 25, etc).
When I switch the bar gauge legend format from Time Series to Heat Map, the LEs are sorted properly but the data is wrong, a bunch of the buckets show up as zero.
How do I either sort those LE names properly so they go up or fix the heat map to display the right values.