-
Notifications
You must be signed in to change notification settings - Fork 11
/
example.yml
53 lines (53 loc) · 1.52 KB
/
example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
db: config-test.db
name: MyApp Status
port: 80
services:
API:
checks:
- name: API Status
interval: 60s
cmd: 'curl -fsSL https://app.myapp.com/api/v0/status'
on_failure:
- webhook:
method: delete
url: https://api.heroku.com/apps/MY_HEROKU_APP/dynos
headers:
Authorization: 'Bearer heroku-token'
Accept: 'application/vnd.heroku+json; version=3'
Web:
checks:
- name: Web delivers homepage
interval: 60s
cmd: 'curl -fsSL -o /dev/null https://app.myapp.ca/'
- name: Web delivers login
interval: 60s
cmd: 'curl -fsSL -o /dev/null https://app.myapp.ca/login'
- name: Homepage latency
type: metric
unit: ms
interval: 60s
cmd: 'curl -fsSL -w "%{time_total}" -o /dev/null https://google.ca'
Redis:
checks:
- name: Responds to pings
interval: 60s
cmd: '! redis-cli -h redis.ca -n 0 -a pass ping | grep ERR'
Mongo:
checks:
- name: Users exist
interval: 60s
cmd: 'echo doing stuff'
on_failure:
- webhook:
method: post
url: https://hooks.slack.com/services/MY_CUSTOM_WEBHOOK
headers:
'Content-Type': 'application/json'
body: '{"text":"Service \"{{service}}\" is down (check \"{{check.name}}\" failed)."}'
on_success:
- webhook:
method: post
url: https://hooks.slack.com/services/MY_CUSTOM_WEBHOOK
headers:
'Content-Type': 'application/json'
body: '{"text":"Service \"{{service}}\" is up (check \"{{check.name}}\" completed)."}'