More improvements to traefik log collecting

This commit is contained in:
Marcus Noble 2021-07-04 10:35:21 +01:00
parent 2b5e2eeff0
commit 9cdc5f2450

View File

@ -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: