Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/broady/pager
Flexible pager system
https://github.com/broady/pager
Last synced: 1 day ago
JSON representation
Flexible pager system
- Host: GitHub
- URL: https://github.com/broady/pager
- Owner: broady
- License: apache-2.0
- Created: 2013-12-29T01:10:38.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-03T03:53:13.000Z (almost 10 years ago)
- Last Synced: 2024-06-19T16:46:42.990Z (5 months ago)
- Language: Go
- Size: 140 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pager
Flexible pager system, written in Go running on AppEngine. E-mails are received via `[email protected]`. The config for that alias is looked up and a series of pagers are alerted until acknowledeged.
Features:
* Filtering over tag (e.g. "cpu" in `chris+cpu@`)
* Filtering by sender
* Filtering over subject line
* Filtering over body
* Substring and regex filters
* Filtering by time of day
* Page via e-mail (SMS or phone call coming)
* Fall-through pager configs (if one channel doesn't acknowledge the alert, the next one will be alerted).## Configuration
Configuration is currently via text files baked into the binary. The configuration language is the protobuf text format.
There are two sets of configuration: matchers and pagers. Matchers define a set of rules for the incoming message. Pagers are a definition of a series of communication channels (e.g. email, phone, sms) with associated timeouts.
Example:
# File: matchers/example
rule: <
# Always send urgent pagers straight to phone.
# Looks for "URGENT" anywhere in the subject line.
subject: <
substring: "URGENT"
>
pager: "phone"
>
rule: <
# Always send urgent pagers straight to phone.
# Matches `example+urgent@`
tag: <
substring: "urgent"
>
pager: "phone"
>
rule: <
# During the day, except during lunch, send pagers via e-mail, escalating to phone.
time: <
from: 800
to: 1130
>
time: <
from: 1330
to: 2000
>
# E-mail first, then SMS, then phone.
pager: "email"
pager: "sms_then_phone"
>
rule: <
# Everything else, only e-mail.
pager: "email"
>
Example pager configs:# File: pagers/phone
contact: <
phone: "+15551234567"
># File: pagers/sms_then_phone
contact: <
# Wait 5 minutes for an ACK, then call the phone.
timeout: 300
sms: "+15551234567"
>
contact: <
phone: "+15551234567"
># File: pagers/email
contact: <
# Wait 5 minutes for an ACK.
timeout: 300
email: "[email protected]"
>## Behaviour/notes
* A rule set is matched when all of the matchers evaluate to true
* Rules like subject/sender/time of day may have multiple conditions - these are OR'd
* If multiple rule sets are defined in a matcher file, the first one to match wins.