-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
14 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
recipients: | ||
- [email protected] | ||
send: | ||
- target: email | ||
addresses: | ||
- [email protected] | ||
subject: "Tamanu Alert - {{ now }}" | ||
template: | | ||
Automated alert! There have been {{ rows | length }} jobs | ||
with errors in the past {{ interval }}. Here are the first 2: | ||
{% for row in rows | slice(end=2) %} | ||
- {{ row.topic }}: {{ row.error }} | ||
{% endfor %} | ||
sql: | | ||
SELECT * FROM jobs | ||
WHERE error IS NOT NULL | ||
AND created_at > $1 | ||
subject: "Tamanu Alert - {{ now }}" | ||
template: | | ||
Automated alert! There have been {{ rows | length }} jobs | ||
with errors in the past {{ interval }}. Here are the first 2: | ||
{% for row in rows | slice(end=2) %} | ||
- {{ row.topic }}: {{ row.error }} | ||
{% endfor %} | ||
SELECT * FROM jobs | ||
WHERE error IS NOT NULL | ||
AND created_at > $1 |