Skip to content

Commit b9e13cc

Browse files
committed
Filter Promtail to only collect weatherust project logs
Add Docker SD filter to only scrape containers from weatherust compose project. This prevents Promtail from collecting logs from ALL containers on the host (immich, traefik, portainer, etc.). Problem: With 20+ containers, Grafana was trying to process too many log streams, causing React to block the UI thread with violations like 'message handler took 243ms'. Solution: Filter at the source - only collect weatherust logs. This dramatically reduces the number of streams Grafana needs to process, fixing the browser freezing issue.
1 parent 821f1ae commit b9e13cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

promtail-config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@ clients:
99
- url: http://loki:3100/loki/api/v1/push
1010

1111
scrape_configs:
12-
# Scrape all Docker container logs
12+
# Scrape only weatherust project Docker container logs
1313
- job_name: docker
1414
docker_sd_configs:
1515
- host: unix:///var/run/docker.sock
1616
refresh_interval: 5s
17+
filters:
18+
- name: label
19+
values: ["com.docker.compose.project=weatherust"]
1720
relabel_configs:
1821
# Use container name as job label
1922
- source_labels: ['__meta_docker_container_name']

0 commit comments

Comments
 (0)