Added nginx log parsing

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2021-11-28 08:45:47 +00:00
parent fd148bdd75
commit 207376a89c
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78

View File

@ -91,6 +91,22 @@ data:
- match: - match:
selector: '{app="promtail"}' selector: '{app="promtail"}'
action: drop 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: kubernetes_sd_configs:
- role: pod - role: pod
relabel_configs: relabel_configs:
@ -152,6 +168,8 @@ data:
- __meta_kubernetes_pod_annotation_kubernetes_io_config_hash - __meta_kubernetes_pod_annotation_kubernetes_io_config_hash
- __meta_kubernetes_pod_container_name - __meta_kubernetes_pod_container_name
target_label: __path__ target_label: __path__
- action: labelmap
regex: __meta_kubernetes_pod_label_(.+)
# - job_name: kubernetes-pods-name # - job_name: kubernetes-pods-name
# pipeline_stages: # pipeline_stages: