Enable fluentd to parse the sub-second portion of timestamps coming from docker logs.
This commit is contained in:
@@ -105,11 +105,13 @@
|
||||
type null
|
||||
</match>
|
||||
|
||||
# Example:
|
||||
# {"log":"[info:2016-02-16T16:04:05.930-08:00] Some log text here\n","stream":"stdout","time":"2016-02-17T00:04:05.931087621Z"}
|
||||
<source>
|
||||
type tail
|
||||
path /var/log/containers/*.log
|
||||
pos_file /var/log/es-containers.log.pos
|
||||
time_format %Y-%m-%dT%H:%M:%S
|
||||
time_format %Y-%m-%dT%H:%M:%S.%NZ
|
||||
tag kubernetes.*
|
||||
format json
|
||||
read_from_head true
|
||||
@@ -142,7 +144,7 @@
|
||||
<source>
|
||||
type tail
|
||||
format /^time="(?<time>[^)]*)" level=(?<severity>[^ ]*) msg="(?<message>[^"]*)"( err="(?<error>[^"]*)")?( statusCode=($<status_code>\d+))?/
|
||||
time_format %Y-%m-%dT%H:%M:%S.%N%z
|
||||
time_format %Y-%m-%dT%H:%M:%S.%NZ
|
||||
path /var/log/docker.log
|
||||
pos_file /var/log/es-docker.log.pos
|
||||
tag docker
|
||||
|
Reference in New Issue
Block a user