1
votes

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?

1

1 Answers

1
votes

You have to add a new widget and add the query:

max(rate(application_apidbacesscount_total[$__range])) by (Api)

enter image description here

Using [$__range] instead of a fixed range will apply the values of rage selector from Grafana