File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,13 +73,13 @@ services:
7373 - grafana-storage:/var/lib/grafana
7474 networks :
7575 - spring-network
76- promtail :
77- image : grafana/promtail :latest
76+ alloy :
77+ image : grafana/alloy :latest
7878 restart : unless-stopped
7979 volumes :
8080 - ./logs:/var/log/app
81- - ./docker-config/promtail/promtail- config.yml :/etc/promtail /config.yml
82- command : -config.file= /etc/promtail /config.yml
81+ - ./docker-config/alloy/ config.alloy :/etc/alloy /config.alloy
82+ command : run /etc/alloy /config.alloy
8383 depends_on :
8484 - loki
8585 networks :
Original file line number Diff line number Diff line change 1+ local.file_match "springboot_logs" {
2+ path_targets = [{
3+ "__path__" = "/var/log/app/*.log",
4+ "job" = "springboot",
5+ "hostname" = constants.hostname,
6+ }]
7+ }
8+
9+ loki.source.file "springboot_logs" {
10+ targets = local.file_match.springboot_logs.targets
11+ forward_to = [loki.write.main.receiver]
12+ }
13+
14+ loki.write "main" {
15+ endpoint {
16+ url = "http://loki:3100/loki/api/v1/push"
17+ }
18+ }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments