fix(promtail): add default tier label to prevent empty label stream errors

Containers that don't match any tier regex had no labels, causing Loki to
reject the stream with "at least one label pair is required".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-30 19:35:28 +02:00
parent 222094d13f
commit 961cdfbcd2

View file

@ -76,6 +76,12 @@ scrape_configs:
target_label: "tier"
replacement: "service"
# Default tier for anything unmatched
- source_labels: ["tier"]
regex: "^$"
target_label: "tier"
replacement: "other"
# Drop monitoring container logs to save space (they're noisy)
- source_labels: ["tier"]
regex: "monitoring"