File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,19 @@ services:
39
39
- prometheus
40
40
networks :
41
41
- monitoring
42
+
43
+ promtail :
44
+ image : grafana/promtail:latest
45
+ container_name : promtail
46
+ volumes :
47
+ - ./promtail-config.yml:/etc/promtail/config.yml
48
+ - /var/log:/var/log
49
+ - /var/lib/docker/containers:/var/lib/docker/containers:ro
50
+ command : -config.file=/etc/promtail/config.yml
51
+ networks :
52
+ - monitoring
53
+ depends_on :
54
+ - loki
42
55
43
56
volumes :
44
57
grafana-storage :
Original file line number Diff line number Diff line change
1
+ server :
2
+ http_listen_port : 9080
3
+ grpc_listen_port : 0
4
+
5
+ positions :
6
+ filename : /tmp/positions.yaml
7
+
8
+ clients :
9
+ - url : http://loki:3100/loki/api/v1/push
10
+ external_labels :
11
+ job : my_app
12
+ env : development
13
+
14
+ scrape_configs :
15
+ - job_name : system
16
+ static_configs :
17
+ - targets : [localhost]
18
+ labels :
19
+ job : my_app
20
+ __path__ : /var/log/**/*.log
21
+
22
+ - job_name : docker_containers
23
+ static_configs :
24
+ - targets : [localhost]
25
+ labels :
26
+ job : my_app
27
+ __path__ : /var/lib/docker/containers/*/*.log
28
+
29
+ - job_name : custom_app
30
+ static_configs :
31
+ - targets : [localhost]
32
+ labels :
33
+ job : my_app
34
+ __path__ : /app/logs/*.log
You can’t perform that action at this time.
0 commit comments