Setting visibility thresholds for metrics?

A common feature in cartography is the ability to hide data after a certain zoom level (e.g., don’t attempt to draw individual houses on a map when you’re looking at the entire city). Is there a way to achieve similar behavior in Grafana? I have some metrics that are interesting over short periods of time, and at this resolution are useful when plotted against other metrics, but at longer periods aren’t really helpful and just clutter up the resulting graph. I am looking for a way to make them disappear once the visible time range exceeds some threshold value.


Sadly this is not a feature of any tsdb query language nor a feature in Grafana

What datasource are you using? With postgres or mysql it would be possible.

I’m using postgres (well, timescaledb, which is the same thing for this purpose). I was thinking of this as a display-side feature, but I guess your suggestion is a query that would simply not return any values for a particular metric when the time range was > some threshold amount?

Yes that was my idea just make it return no data if the interval is larger then a certain value.