Reputation: 1
I am setting up dynamic threshold values (upper and lower bound). These values are from a SQL statement (e.g. select percentile("value",80) from apc where metrics="temperature"
)
Instead of: var upperbound = 16
How can we assign the upperbound variable to the output of the SQL statement?
Upvotes: 0
Views: 456
Reputation: 22592
You cannot do this with InfluxQL. You have two options:
Subqueries. You can use multiple subqueries in your main query to fetch the upper and lower bounds
Try our new query language, Flux
https://docs.influxdata.com/flux/v0.24/
It can be enabled on InfluxDB 1.7 and 2.0-alpha
Upvotes: 1