SQL Alerts are a very powerful way to be notified about things proactively based on data in your database. This can be useful for a lot of things, such as:
- know when error rates spike
- be notified when your customers perform certain actions (such as when they start using a new feature, such as creating a new SQL alert :-) )
- get a brief overview of certain events happening yesterday every morning in your email inbox (may be rudimentary, but still useful)
- get an additional set of capabilities to your existing technical monitoring environment based on Pingdom, New Relic, DataDog, or any of these tools by checking conditions on data in your database
A SQL Alert has number of options:
Name and Description to be able to capture a purpose of a specific alert
Trigger condition, which determines the condition which results in sending the alert:
- Query produces some rows - would trigger the alert when the sql query has 1 or more rows as an output
- Query produces no rows - would trigger the alert when the sql query has 0 rows as an output
- Value greater/lower/equal/not-equal - would trigger the alert by comparing a single numerical value as query output to the entered value. The alert is also triggered in case the query produces unexpected results (no rows, or more rows/columns than just single value)
Alert schedule, which determies when/how frequently Cluvio would run the alert query:
- Disabled - the alert is not run automatically, but can be triggered manually from the alerts list
- Run every x minutes/hours - the alert query is run every x minutes/hours from the last time it was run. I.e. if I set the schedule to run every 24 hours, and run the alert now (e.g. by saving it), it would next run 24 hours from now
- Run every day as hh:mm - the alert would be run at the times specified - you can enter several values separated by comma in hh:mm format (hh from 00-23 and mm from 00-59). The times are in the timezone specified in your Organization preferences.
Send email to is the list of alert recipients, separated by comma. Important: if no emails are specified, the alert will be run, but no emails will be sent. You can also easily get the alerts delivered to Slack channels - see a guide on how to set this up here.
Send on all alert runs is a useful setting to make sure the alerts are run at the desired times. With this turned on, an email will be sent even if the alert is not triggered.
Datasource and Query contain the actual query to run