As someone new to SolarWinds, I have set up Application Monitors that conduct periodic Oracle database checks for irregularities like duplicate entries. These monitors run queries typically structured as "select count(*) ...," flagging any non-zero counts as critical in the component status. If a monitor detects a critical status, an alert with the specific component name is triggered, and an email notification is sent to me. While this alerts me to the presence of an issue, it doesn't specify the actual problem. I want to enhance the email alerts by including the SQL query results—ideally indicating who caused the alert, such as "John Doe."
My research indicates that I should be able to include the results in the email using this format: "${SQL:SELECT [value] FROM [schema.table] WHERE [conditions]}", with specific values, schema.table, and conditions pertinent to my desired output. Despite this, when I preview it, the email body shows "MACRO SQL ERROR - Invalid object name [schema.table]." Can results from an external database be incorporated into the body of an alert email? And if so, what could be the error in my approach?
I appreciate your assistance!