Skip to content

Instantly share code, notes, and snippets.

- type: setval
map:
title: I just changed the title!
tags:
- some
- cool
- tags
- type: stakeholder
ids:
- stk_xxxxx1
# default syntax, assign to one value (user, team, router, schedule)
- type: assign
receiver: usr_xxxxxx1
# advanced syntax, assign to multiple values (only user or teams)
- type: assign
receiver:
- usr_xxxxxx1
- tem_xxxxxx1
- type: automate
ids:
- atm_xxxxxx1
- atm_xxxxxx2
- type: aggregate
by:
- urgency
timeout: 5m
receiver: tem_xxxxxx
{
always: true,
alert: {...}, // the alert object
log: {...}, // the source log of the alert (if one exists)
log_parsed: boolean, // a boolean indicating if PagerTree was able to parse the log to an object
}
$timeBetween:
timezone: 'America/Los_Angeles'
timeformat: 'hh:mm a'
starttime: '08:00 am'
endtime: '05:00 pm'
$day:
timezone: 'America/Los_Angeles'
$in:
- 6
- 7
---
rules:
# Each rule has a single match condition and an actions array. Only the first matching rule will be processed.
# match is an object with
# - key(s) - context property
# - value - operators
# operators: $in, $nin, $exists, $gte, $gt, $lte, $lt, $eq, $ne, $mod, $all, $and, $or, $nor, $not, $size, $type, $regex, $where, $elemMatch. (see https://www.npmjs.com/package/sift)
# You can match multiple properies on the alert.
- match:
alert.title:
---
rules:
- match:
always: true
actions:
# run a notification cycle. 1st notify me via email, sms, & slack.
# If the alert is still open after 1 minute, notify me via voice.
# If the alert is still open 5 minutes later, repeat this cycle.
- type: notify
channels: