File tree Expand file tree Collapse file tree 2 files changed +67
-0
lines changed Expand file tree Collapse file tree 2 files changed +67
-0
lines changed Original file line number Diff line number Diff line change @@ -80,3 +80,33 @@ services:
80
80
- books
81
81
- customers
82
82
- orders
83
+
84
+ cadvisor :
85
+ image : gcr.io/cadvisor/cadvisor:latest
86
+ container_name : cadvisor
87
+ ports :
88
+ - 8080:8080
89
+ volumes :
90
+ - /:/rootfs:ro
91
+ - /var/run:/var/run:rw
92
+ - /sys:/sys:ro
93
+ - /var/lib/docker/:/var/lib/docker:ro
94
+ depends_on :
95
+ - frontend
96
+ - books
97
+ - customers
98
+ - orders
99
+
100
+ prometheus :
101
+ image : prom/prometheus:latest
102
+ container_name : prometheus
103
+ ports :
104
+ - 9090:9090
105
+ command :
106
+ - --config.file=/etc/prometheus/prometheus.yml
107
+ volumes :
108
+ - ./prometheus.yml:/etc/prometheus/prometheus.yml:ro
109
+ depends_on :
110
+ - cadvisor
111
+
112
+
Original file line number Diff line number Diff line change
1
+ # my global config
2
+ global :
3
+ scrape_interval : 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
4
+ evaluation_interval : 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
5
+ # scrape_timeout is set to the global default (10s).
6
+
7
+ # Attach these labels to any time series or alerts when communicating with
8
+ # external systems (federation, remote storage, Alertmanager).
9
+ external_labels :
10
+ monitor : ' codelab-monitor'
11
+
12
+ # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
13
+ rule_files :
14
+ # - "first.rules"
15
+ # - "second.rules"
16
+
17
+ scrape_configs :
18
+ - job_name : cadvisor
19
+ scrape_interval : 5s
20
+ static_configs :
21
+ - targets :
22
+ - cadvisor:8080
23
+ # - job_name: 'frontend'
24
+ # static_configs:
25
+ # - targets: ['localhost:3333']
26
+
27
+ # - job_name: 'books'
28
+ # static_configs:
29
+ # - targets: ['localhost:8888']
30
+
31
+ # - job_name: 'customers'
32
+ # static_configs:
33
+ # - targets: ['localhost:5555']
34
+
35
+ # - job_name: 'orders'
36
+ # static_configs:
37
+ # - targets: ['localhost:7777']
You can’t perform that action at this time.
0 commit comments