error at parsing the nginx pod logs #3936
roiromanoclick
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Im running Nginx proxy as a pod ( container) and the fluentd is getting error in parsing stage -
"0 invalid line found file="/var/log/containers/nginx-56c854d848-fh6wl_nginx-86e27c7add6ebf1fb25434cb8e4122e8ddb50357432787ffc5679cb0a1b8e2fb.log" line="{"log":"172.30.1.140 User:- Host:172.30.1.85 Request:GET /isalivelb HTTP/1.1 Status:200 Sent:0 - OrigAddr:- BackendAddr:- TotalDur:0.000 X-XSRF-TOKEN:- UpDur:- UserAgent:ELB-HealthChecker/2.0 Time:[30/Oct/2022:07:44:30 +0000] Server:172.30.1.85\n","stream":"stdout","time":"2022-10-30T07:44:30.436011225Z"}" error="invalid time format: value = 2022-10-30T07:44:30.436011225Z, error_class = ArgumentError, error = string doesn't match"
2022-10-30 07:44:34 +0000 [warn]"
---this is the fluentd configuration-
pods-fluent.conf: |-
@type tail
read_from_head true
tag kubernetes.*
path /var/log/containers/.log
pos_file /var/log/fluentd-containers.log.pos
exclude_path ["/var/log/containers/fluent"]
@log_level debug
@type "#{ENV['FLUENT_CONTAINER_TAIL_PARSER_TYPE'] || 'json'}"
time_format %d/%b/%Y:%H:%M:%S %z
<filter kubernetes.**>
@type kubernetes_metadata
@id filter_kube_metadata
kubernetes_url "#{ENV['FLUENT_FILTER_KUBERNETES_URL'] || 'https://' + ENV.fetch('KUBERNETES_SERVICE_HOST') + ':' + ENV.fetch('KUBERNETES_SERVICE_PORT') + '/api'}"
verify_ssl "#{ENV['KUBERNETES_VERIFY_SSL'] || true}"
ca_file "#{ENV['KUBERNETES_CA_FILE']}"
skip_labels "#{ENV['FLUENT_KUBERNETES_METADATA_SKIP_LABELS'] || 'false'}"
skip_container_metadata "#{ENV['FLUENT_KUBERNETES_METADATA_SKIP_CONTAINER_METADATA'] || 'false'}"
skip_master_url "#{ENV['FLUENT_KUBERNETES_METADATA_SKIP_MASTER_URL'] || 'false'}"
skip_namespace_metadata "#{ENV['FLUENT_KUBERNETES_METADATA_SKIP_NAMESPACE_METADATA'] || 'false'}"
Beta Was this translation helpful? Give feedback.
All reactions