Right now we can alert only on when the state is one of ok or trigged. We want to send an alert whenever there is a change from unknown to triggered or ok. Our requirement is we want alert whenever there is a query output.

A workaround you can apply right now is to have another query that queries the original one and counts the row. Then you can simply alert if the count is > 0.

1 Like

For anyone who comes here again, I used a different workaround. I UNION'd my normal query with a dummy SELECT returning a single null row (whatever that logically means in your application). Thus, the query always returns something, and is never “unknown”. Then, the alert can trigger on there being any rows that match a test for “real data”.