My requirement:
I have a MySQL query that looks up the data in the performance_schema and returns the SQL statements that do not meet my performance criteria. This query returns multiple rows and columns. I want to create a SolarWinds alert that will run this query once a day and, if it returns any rows, email me the result as an alert. If the query returns zero rows for that day, then there is no alert.
What I tried:
On the DPA create alert screen, I saw that I can write a custom MySQL query for the alert as long as the SQL returns a single or multiple numeric columns, or a single Boolean value, etc. The SolarWinds UI does not say but I guess the custom SQL must also return only one row.
But I want an alert based on a custom query that returns multiple rows and multiple columns. So I also tried the DPA create report screen. There, I found no place where I can enter a custom query. (Note: For example, the Top SQL report type has a radio button labeled "User-Defined SQL Statements". But this is the list of SQL statements to monitor. A different thing.)
Question:
How can I create a DPA alert or report with a custom MySQL query that returns multiple rows and columns?