File tree 4 files changed +43
-11
lines changed
4 files changed +43
-11
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
route :
2
- receiver : ' mail'
3
- repeat_interval : 4h
4
2
group_by : [ alertname ]
3
+ receiver : ' mail' # default receiver
4
+ repeat_interval : 24h
5
+ routes :
6
+ - receiver : ' teams'
7
+ repeat_interval : 12h
8
+ matchers :
9
+ - severity="medium"
5
10
11
+ - receiver : ' teams'
12
+ repeat_interval : 4h
13
+ matchers :
14
+ - severity="high"
6
15
7
- receivers :
8
16
17
+ receivers :
9
18
- name : ' mail'
10
19
email_configs :
11
- - smarthost : ' smtp.gmail .com:465'
12
- auth_username : ' your_mail@gmail .com'
13
- auth_password : " "
14
- from : ' your_mail@gmail .com'
15
- to : ' some_mail@gmail .com'
16
-
20
+ - smarthost : ' yourmailhost .com:465'
21
+ auth_username : ' yourmail@yourmailhost .com'
22
+ auth_password : " your mail password "
23
+ from : ' yourmail@yourmailhost .com'
24
+ to : ' someonesmail@yourmailhost .com'
25
+ require_tls : false
17
26
27
+ - name : ' teams'
28
+ webhook_configs :
29
+ - url : " http://prom2teams:8089"
30
+ send_resolved : true
Original file line number Diff line number Diff line change @@ -24,12 +24,20 @@ services:
24
24
image : prom/alertmanager:v0.23.0
25
25
restart : unless-stopped
26
26
ports :
27
- - " 12702 :9093"
27
+ - " 9093 :9093"
28
28
volumes :
29
29
- " ./alertmanager:/config"
30
30
- alertmanager-data:/data
31
31
command : --config.file=/config/alertmanager.yml --log.level=debug
32
32
33
+ prom2teams :
34
+ image : idealista/prom2teams:3.2.3
35
+ restart : unless-stopped
36
+ environment :
37
+ PROM2TEAMS_CONNECTOR : " https://og2gether.webhook.office.com/webhookb2/b5370781-89c2-45ba-be14-453e29dfb0a9@8794e153-c3bd-4479-8bea-61aeaf167d5a/IncomingWebhook/57e69e8f10dd49ce8dae3b816159e228/4eb361c9-e566-4b66-ab30-bed630f495a5"
38
+ ports :
39
+ - 8089:8089
40
+
33
41
34
42
volumes :
35
43
prometheus-data :
Original file line number Diff line number Diff line change 2
2
- name : DemoAlerts
3
3
rules :
4
4
- alert : InstanceDown
5
+ expr : up{job="services"} < 1
6
+ for : 1m
7
+ labels :
8
+ severity : low
9
+ annotations :
10
+ summary : ' Alert with low severity.'
11
+
12
+ - alert : InstanceDownCritical
5
13
expr : up{job="services"} < 1
6
14
for : 1m
15
+ labels :
16
+ severity : high
17
+ annotations :
18
+ summary : ' Alert with high severity.'
You can’t perform that action at this time.
0 commit comments