From 2b5e2eeff0d218ce46f7c6711fadba8bed3db3c6 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Sun, 4 Jul 2021 10:09:02 +0100 Subject: [PATCH] First attempt at extracting access log fields to labels --- manifests/monitoring/promtail.yaml | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/manifests/monitoring/promtail.yaml b/manifests/monitoring/promtail.yaml index 4b3397d..e118015 100644 --- a/manifests/monitoring/promtail.yaml +++ b/manifests/monitoring/promtail.yaml @@ -84,6 +84,14 @@ data: - match: selector: '{namespace="tekton-pipelines"}' action: drop + - match: + selector: '{k8s_app="traefik-ingress-lb"}' + stages: + - json: + expressions: + request_host: RequestHost + - labels: + request_host: kubernetes_sd_configs: - role: pod relabel_configs: @@ -146,6 +154,14 @@ data: - match: selector: '{namespace="tekton-pipelines"}' action: drop + - match: + selector: '{k8s_app="traefik-ingress-lb"}' + stages: + - json: + expressions: + request_host: RequestHost + - labels: + request_host: kubernetes_sd_configs: - role: pod relabel_configs: @@ -212,6 +228,14 @@ data: - match: selector: '{namespace="tekton-pipelines"}' action: drop + - match: + selector: '{k8s_app="traefik-ingress-lb"}' + stages: + - json: + expressions: + request_host: RequestHost + - labels: + request_host: kubernetes_sd_configs: - role: pod relabel_configs: @@ -284,6 +308,14 @@ data: - match: selector: '{namespace="tekton-pipelines"}' action: drop + - match: + selector: '{k8s_app="traefik-ingress-lb"}' + stages: + - json: + expressions: + request_host: RequestHost + - labels: + request_host: kubernetes_sd_configs: - role: pod relabel_configs: @@ -358,6 +390,14 @@ data: - match: selector: '{namespace="tekton-pipelines"}' action: drop + - match: + selector: '{k8s_app="traefik-ingress-lb"}' + stages: + - json: + expressions: + request_host: RequestHost + - labels: + request_host: kubernetes_sd_configs: - role: pod relabel_configs: