Type | Custom SQL Alert - Single Alert Status Return |
Description | Executes a user-defined SQL statement that will return a single string value that represents an alert status. Valid values are: NORMAL, INFO, LOW, MEDIUM, HIGH |
This alert monitors the status of commands to ensure they are executed correctly. It captures issues related to CyberArk integration failures and database connectivity problems that traditional alerts might miss.
Threshold: The alert triggers if there are any mismatches between the command and its expected status or if the database instance is not available.
Alert Status Values:
- NORMAL: No issues found.
- HIGH: One or more command status mismatches or database connectivity issues found.
- BROKEN: An unexpected error occurred.
SQL Query:
SELECT CASE WHEN COUNT(*) = 0 THEN 'NORMAL' WHEN COUNT(*) > 0 THEN 'HIGH' ELSE 'BROKEN' END AS ALERT_STATUS FROM <database_table> WHERE ((COMMAND = 'START' AND STATUS != 'STARTED') OR (COMMAND = 'STOP' AND STATUS != 'STOPPED')) AND ID=#DBID#;