From 207376a89cdeff42aeb8396ae6106c6974f20a38 Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Sun, 28 Nov 2021 08:45:47 +0000 Subject: [PATCH] Added nginx log parsing Signed-off-by: Marcus Noble --- manifests/monitoring/promtail.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/manifests/monitoring/promtail.yaml b/manifests/monitoring/promtail.yaml index 358d53d..fd612be 100644 --- a/manifests/monitoring/promtail.yaml +++ b/manifests/monitoring/promtail.yaml @@ -91,6 +91,22 @@ data: - match: selector: '{app="promtail"}' action: drop + - match: + selector: '{app="ingress-nginx"}' + stages: + - json: + expressions: + request_host: host + request_path: path + request_method: method + response_status: status + - drop: + source: "request_path" + value: "/healthz" + - labels: + request_host: + request_method: + response_status: kubernetes_sd_configs: - role: pod relabel_configs: @@ -152,6 +168,8 @@ data: - __meta_kubernetes_pod_annotation_kubernetes_io_config_hash - __meta_kubernetes_pod_container_name target_label: __path__ + - action: labelmap + regex: __meta_kubernetes_pod_label_(.+) # - job_name: kubernetes-pods-name # pipeline_stages: