Skip to content

Instantly share code, notes, and snippets.

Incoming call from {{join (lodash "toArray" data.From) " "}}
---
rules:
- match:
$and:
- $day:
timezone: 'America/Los_Angeles'
$in:
- 1
- 2
- 3
{
alert: {...}, // the PagerTree alert object
event: {
type: 'alert.rejected'
},
}
{
integration: {...} // the integration object
data: {
... // what was sent by the integration
// email integration special attributes
to: //the recipients of the email joined by a semi-colon
from: // the sender of the email joined by a semi-colon
subject: // the email subject
message: // the sanitized body of the e-mail
---
rules:
- match:
alert.title:
"$regex": "Critical Systems Down"
"$options": "i"
alert.urgency:
"$in":
- high
- critical
# Example: aggregate the alert by source for a period of 5 minutes. Then assign all aggregated alerts to tem_xxxxxx1
---
rules:
- match:
always: true
actions:
- type: aggregate
by:
- source_id
timeout: 1m
---
rules:
# array of rules
- match:
# ... properties to match
actions:
# ... array of actions
- type: repeat
times: 1
- type: notify
channels:
- email
- slack
timeout: 1m
- type: ignore