Dynamic thresholds

I’m trying to add a dynamic threshold line to this time series. Is there a SQL formula that I can use to easily add one? The threshold options on the visualizations doesn’t show up on the graph.

@rartintech As you may have guessed, Grafana does not support true dynamic thresholds in the options panel:

I have found that creating another query or transformation is often sufficient. For example, in the screenshot below, I have 2 queries (actual and setpoint). I used simple math transformations (setpoint -20 and setpoint +20) to create the orange lines. I created alerts to notify me whenever the actual value crosses the UCL or LCL.


This is an awesome hacks!

This sounds like exactly what I am looking for. Would you be able to attach the SQL you used to build the queries?

I did not use SQL for the above screenshot. It’s done in Flux (datasource: InfluxDB).

Just use the Transform tab to create the UCL and LCL lines based on the query you have for Setpoint.