File tree Expand file tree Collapse file tree 4 files changed +34
-4
lines changed Expand file tree Collapse file tree 4 files changed +34
-4
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ services:
13
13
- --config.file=/etc/prometheus/prometheus.yml
14
14
volumes :
15
15
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
16
+ - ./prometheus/targets.json:/etc/prometheus/targets.json:ro
16
17
labels :
17
18
- ' traefik.enable=true'
18
19
- ' traefik.http.routers.prometheus.rule=Host(`${PROMETHEUS_HOST}`)'
@@ -21,6 +22,20 @@ services:
21
22
- " traefik.http.routers.prometheus.middlewares=test-auth"
22
23
- " traefik.http.middlewares.test-auth.basicauth.users=${AUTH_USER_PASSWORD}"
23
24
25
+ node-exporter :
26
+ image : prom/node-exporter:latest
27
+ container_name : node-exporter
28
+ restart : unless-stopped
29
+ volumes :
30
+ - /proc:/host/proc:ro
31
+ - /sys:/host/sys:ro
32
+ - /:/rootfs:ro
33
+ command :
34
+ - ' --path.procfs=/host/proc'
35
+ - ' --path.rootfs=/rootfs'
36
+ - ' --path.sysfs=/host/sys'
37
+ - ' --collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
38
+
24
39
promtail :
25
40
image : grafana/promtail:1.4.1
26
41
container_name : promtail
Original file line number Diff line number Diff line change @@ -11,7 +11,9 @@ scrape_configs:
11
11
static_configs :
12
12
- targets : ['prometheus:9090']
13
13
14
- - job_name : ' reverse-proxy'
15
- static_configs :
16
- - targets : ['reverse-proxy:8680']
14
+ - job_name : ' targets-discovery'
15
+ file_sd_configs :
16
+ - files :
17
+ - ' targets.json'
18
+
17
19
Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "labels" : {
4
+ "job" : " node-exporter"
5
+ },
6
+ "targets" : [
7
+ " node-exporter:9100"
8
+ ]
9
+ }
10
+ ]
Original file line number Diff line number Diff line change 1
1
2
2
resource "null_resource" "mithril_monitoring" {
3
3
depends_on = [
4
- null_resource. mithril_network
4
+ null_resource. mithril_network ,
5
+ null_resource. mithril_reverse_proxy ,
6
+ null_resource. mithril_aggregator ,
7
+ null_resource. mithril_signer
5
8
]
6
9
7
10
triggers = {
You can’t perform that action at this time.
0 commit comments