-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.dist.conf
59 lines (49 loc) · 1.71 KB
/
config.dist.conf
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
54
55
56
57
58
59
slack {
channel = "#test_"
token = "xoxb-77777777777-AAAAAAAAAAAAAAAAAAAAAAAA"
icon_url = "https://example.com/avatars/bot-avatar.jpg"
}
twilio {
phone_from = "+71234567890"
phone_to = "+70987654321"
token = "ffffffffffffffffffffffffffffffff"
sid = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
twiml_url = "http://some.host:7778/twiml"
}
consul {
url = "localhost:8500"
alert = "slack"
service "alert-via-twilio"
alert("twilio")
service "consul"
service "grafana"
good("online", 2 cycles)
warn("offline", 3 cycles)
crit("offline", 5 cycles)
}
influx {
url = "http://influx.service.consul:8086"
alert = "slack"
template route_5xx(route, window) {
select count(*) from "30days".http where http_path =~ /%route/ and http_code =~ /5../ and time > now() - %window;
} preview {
select time, http_request_id from "30days".http where http_path =~ /%route/ and http_code =~ /5../ and time > now() - %window order by time desc limit 5;
}
checks {
route_5xx("api\/.*\/tasks\/show", "3h") as "some test route"
good(=0, 1 cycle)
warn(>=1, 1 cycle)
crit(>=2, 1 cycle)
route_5xx("api\/.*\/oauth2\/token", "3h") as "route /api/oauth2/token"
good(=0, 1 cycle)
warn(>=1, 1 cycle)
crit(>=2, 1 cycle)
route_5xx("api\/.*\/purchase\/subscribe" , "3h") as "AHTUNG! 500 in /api/purchase/subscribe"
good(=0, 1 cycle)
crit(>=2, 1 cycle)
no_free_space("/srv/yandex.disk" , "data-mirror") as "free space (yandex.disk)"
good(<80, 10 cycles)
warn(>80, 10 cycles)
crit(>90, 10 cycles)
}
}