Alert YAML
Along with alertings at the dashboard level and can be created via the UI, there might be more extensive alerting that you might want to develop and can be done so the an alert.yaml. When creating an alert via a YAML file, you'll see this denoted in the UI as Created through code
.
type
— Refers to the resource type and must be alert
(required).
title
— Refers to the display name for the metrics view [deprecated, use display_name
] (required).
display_name
- Refers to the display name for the metrics view (required).
refresh
- Specifies the refresh schedule that Rill should follow to re-ingest and update the underlying source data (optional).
cron
- a cron schedule expression, which should be encapsulated in single quotes, e.g.'* * * * *'
(optional).every
- a Go duration string, such as24h
(docs) (optional).disable
- boolean, completely disable the resource, without deleting it (optional).ref_update
-: boolean, don't refresh when a dependency is refreshed (optional).
refresh:
cron: "0 8 * * *"
intervals
- define the interval of the alert to check (required).
duration
- a valid ISO8601 duration to define the interval duration. (required).limit
- maximum number of intervals to check for on invocation (optional).check_unclosed
- boolean, whether unclosed intervals should be checked (optional).
intervals:
duration: 'P3D'
# limit: 5
# check_unclosed: true
timeout
- define the timeout of the alert in seconds (optional).
data
- define the alert constraints using various parameters (required).
connector
- if running a SQL query or usingglob
, will need to define what connector to use (optional).sql
- raw SQL query to run against existing tables and views in your project (optional).metrics_sql
- a SQL query against a metrics view in your project (optional).api
- name of existing custom API in your project (optional).args
- used withapi
to define args to be passed to the API (optional).glob
- define the path in your connector (optional).resource_status
-where_error
- boolean, if the returning data alert constraints returns true or false (required).
#Alert will trigger if any of the project's resources return with a reconile error.
data:
resource_status:
where_error: true
on_recover
- boolean, send alert on recovery, defaults to false (optional).
on_fail
- boolean, send alert of failure, defaults to true (optional).
on_error
- boolean, send the alert on error, defaults to false (optional).
renotify
- boolean, enable to disable renotifcation of alert, defaults to false (optional).
renotify_after
- define the renotification of the alert in seconds, equiavalent to snooze duration in UI, defaults to 'Off' (optional).
on_recover: true
on_fail: true
on_error: true
renotify: true
# renotify_after: 360m
notify
- define where to notify the user of the defined alert (required).
email
-recipients
- an array of emails to send the alert to (optional).
slack
-users
- an array of Slack users to send the alert notification to (optional).channels
- an array of Slack channels to send the alert notification to (optional).webhooks
- an array of webhooks to send the alert notification to (optional).
# Send notifications by email or slack
notify:
email:
recipients: [email@domain.com]
slack:
users: []
channels: []
webhooks: []