Can Grafana do parameters?

I am new to Grafana and I am still exploring the tool and its capabilities. I am wondering if Grafana has the option to set parameters that users can specify, like specifying a value and filtering the entire dashboard for only values greater than the selected value. And is it possible to create something like a slider object which allows the user to set the value? Also, it is possible to create a histogram? Thanks!

1 Like

Yes, here are two ways:

And an example on the demo site using both:

There is no slider object in the Grafana UI. I suppose it would be possible to create an external slider plugin panel that you could include on a dashboard. I don’t think anyone has ever asked for one though (I couldn’t find any feature requests for a slider on GitHub).

1 Like

Thanks a lot this is very helpful.

With regards to the template variables and ad-hoc filters, is it possible to set a threshold value that would filter the data to include only values greater than the selected value?

For the ad-hoc filters, no - they are ad-hoc and allow everything (which is why sometimes you want to use template variables instead to get more control over the user experience).

For template variables, most of the time the source is a query to your data source so in the query you would specify a threshold value. e.g. WHERE value > 10

Caveat: but this depends on which database/data source you are using, something like Amazon’s Cloudwatch would probably not allow that. You can also use regex to filter the template variable query so you can probably get this to work in most situations either with just the query or with a combination.

1 Like