Skip to content

Commit

Permalink
Merge pull request kubernetes#21482 from chrisleck/cle-sub-second-flu…
Browse files Browse the repository at this point in the history
…entd

Enable fluentd to parse the sub-second portion of timestamps coming from docker logs
  • Loading branch information
a-robinson committed Feb 24, 2016
2 parents 3f7705b + c34ecf7 commit af93275
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@
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
format json
time_key time
path /var/log/containers/*.log
pos_file /var/log/gcp-containers.log.pos
time_format %Y-%m-%dT%H:%M:%S
time_format %Y-%m-%dT%H:%M:%S.%NZ
tag reform.*
read_from_head true
</source>
Expand Down Expand Up @@ -91,7 +93,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/gcp-docker.log.pos
tag docker
Expand Down

0 comments on commit af93275

Please sign in to comment.