Reputation: 78
I am trying to create a query that groups the data by "Api" field and selects a value field by using prometheus and grafana.
My sample query (promql) is max (application_apidbacesscount_total) by (Api) [30m:1m]
. This works for getting max value with grouping the data by "Api" field.
How can i do that using grafana's panel? Is it possible to give Grafana a base query and modify it with panel fields?
Upvotes: 2
Views: 9308
Reputation: 1719
You have to add a new widget and add the query:
max(rate(application_apidbacesscount_total[$__range])) by (Api)
Using [$__range]
instead of a fixed range will apply the values of rage selector from Grafana
Upvotes: 3