File tree Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ services:
3
3
image : prom/prometheus:latest
4
4
volumes :
5
5
- ./prometheus.yml:/etc/prometheus/prometheus.yml
6
+ - ../../prometheus_v2/rules/alerts.yml:/etc/prometheus/rules/alerts.yml
6
7
ports :
7
8
- " 9090:9090"
8
9
networks :
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ global:
13
13
14
14
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
15
15
rule_files :
16
- # - "first_rules .yml"
16
+ - " /etc/prometheus/rules/alerts .yml"
17
17
# - "second_rules.yml"
18
18
19
19
# A scrape configuration containing exactly one endpoint to scrape:
Original file line number Diff line number Diff line change 1
1
services :
2
2
prometheus :
3
3
image : prom/prometheus:latest
4
+ links :
5
+ - alertmanager
4
6
volumes :
5
7
- ./prometheus.yml:/etc/prometheus/prometheus.yml
8
+ - ../../prometheus_v2/rules/alerts.yml:/etc/prometheus/rules/alerts.yml
6
9
ports :
7
10
- " 9090:9090"
8
11
networks :
@@ -19,6 +22,14 @@ services:
19
22
networks :
20
23
kickstart :
21
24
ipv4_address : " 172.27.2.3"
25
+ alertmanager :
26
+ image : prom/alertmanager:latest
27
+ container_name : alertmanager
28
+ ports :
29
+ - 9093:9093
30
+ networks :
31
+ kickstart :
32
+ ipv4_address : " 172.27.2.4"
22
33
networks :
23
34
kickstart :
24
35
driver : bridge
Original file line number Diff line number Diff line change @@ -5,15 +5,15 @@ global:
5
5
# scrape_timeout is set to the global default (10s).
6
6
7
7
# Alertmanager configuration
8
- # alerting:
9
- # alertmanagers:
10
- # - static_configs:
11
- # - targets:
12
- # - alertmanager:9093
8
+ alerting :
9
+ alertmanagers :
10
+ - static_configs :
11
+ - targets :
12
+ - alertmanager:9093
13
13
14
14
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
15
15
rule_files :
16
- # - "first_rules .yml"
16
+ - " /etc/prometheus/rules/alerts .yml"
17
17
# - "second_rules.yml"
18
18
19
19
# A scrape configuration containing exactly one endpoint to scrape:
You can’t perform that action at this time.
0 commit comments