From 9cdc5f2450b5f52482e2b2c11d8e283595ab50e3 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Sun, 4 Jul 2021 10:35:21 +0100 Subject: [PATCH] More improvements to traefik log collecting --- manifests/monitoring/promtail.yaml | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/manifests/monitoring/promtail.yaml b/manifests/monitoring/promtail.yaml index e118015..6280a61 100644 --- a/manifests/monitoring/promtail.yaml +++ b/manifests/monitoring/promtail.yaml @@ -90,8 +90,17 @@ data: - json: expressions: request_host: RequestHost + request_path: RequestPath + error: error + - drop: + source: "request_path" + value: "/healthz" + - template: + source: has_error + template: '{{ if .error }}true{{ else }}false{{ end }}' - labels: request_host: + has_error: kubernetes_sd_configs: - role: pod relabel_configs: @@ -160,8 +169,17 @@ data: - json: expressions: request_host: RequestHost + request_path: RequestPath + error: error + - drop: + source: "request_path" + value: "/healthz" + - template: + source: has_error + template: '{{ if .error }}true{{ else }}false{{ end }}' - labels: request_host: + has_error: kubernetes_sd_configs: - role: pod relabel_configs: @@ -234,8 +252,17 @@ data: - json: expressions: request_host: RequestHost + request_path: RequestPath + error: error + - drop: + source: "request_path" + value: "/healthz" + - template: + source: has_error + template: '{{ if .error }}true{{ else }}false{{ end }}' - labels: request_host: + has_error: kubernetes_sd_configs: - role: pod relabel_configs: @@ -314,8 +341,17 @@ data: - json: expressions: request_host: RequestHost + request_path: RequestPath + error: error + - drop: + source: "request_path" + value: "/healthz" + - template: + source: has_error + template: '{{ if .error }}true{{ else }}false{{ end }}' - labels: request_host: + has_error: kubernetes_sd_configs: - role: pod relabel_configs: @@ -396,8 +432,17 @@ data: - json: expressions: request_host: RequestHost + request_path: RequestPath + error: error + - drop: + source: "request_path" + value: "/healthz" + - template: + source: has_error + template: '{{ if .error }}true{{ else }}false{{ end }}' - labels: request_host: + has_error: kubernetes_sd_configs: - role: pod relabel_configs: