Now I’m using influx ql. Do I have to use flux to solve the above problem?
And referring to the tutorial you sent me, can’t I substitute a value from another datasource other than a fixed number in the calculation formula?
Yes, I believe that you must use flux in order to query postgres.
My understanding is that you can use two queries from two different data sources when configuring an alert. Maybe you can start with simpler queries and see if it works?