From 22bd0f555e948d6739acc92d2bf642eb31bc701e Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sat, 31 Oct 2020 17:00:30 +0900 Subject: [PATCH] Modify `promtail` config for `loki`. --- cookbooks/loki/templates/etc/promtail/loki.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cookbooks/loki/templates/etc/promtail/loki.yaml b/cookbooks/loki/templates/etc/promtail/loki.yaml index a684f40..6b9492b 100644 --- a/cookbooks/loki/templates/etc/promtail/loki.yaml +++ b/cookbooks/loki/templates/etc/promtail/loki.yaml @@ -21,8 +21,10 @@ scrape_configs: - match: selector: '{job="loki"}' stages: - - regex: + - drop: + expression: 'entry out of order' + - regex: expression: '^[^ ]+ +[0-9]+ [0-9]+:[0-9]+:[0-9]+ [^ ]+ loki[^ ]+ .*level=(?P[^ ]+) ts=(?P[^ ]+) (?P.+)$' - timestamp: