Skip to content

Instantly share code, notes, and snippets.

@fujiwara
Created September 5, 2014 01:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fujiwara/8a2c30d40dec6403aa88 to your computer and use it in GitHub Desktop.
Save fujiwara/8a2c30d40dec6403aa88 to your computer and use it in GitHub Desktop.
in_tail wrong time parsing?
[fluentd]
$ fluentd -c fluentd.conf
2014-09-05 10:17:57 +0900 [info]: starting fluentd-0.10.53
2014-09-05 10:17:57 +0900 [info]: reading config file path="fluentd.conf"
2014-09-05 10:17:57 +0900 [info]: gem 'fluentd' version '0.10.53'
2014-09-05 10:17:57 +0900 [info]: using configuration file: <ROOT>
<source>
type tail
tag ltsv
format ltsv
path /tmp/test.ltsv
</source>
<source>
type tail
tag json
format json
path /tmp/test.json
</source>
<match **>
type stdout
</match>
</ROOT>
2014-09-05 10:17:57 +0900 [info]: adding source type="tail"
2014-09-05 10:17:57 +0900 [warn]: 'pos_file PATH' parameter is not set to a 'tail' source.
2014-09-05 10:17:57 +0900 [warn]: this parameter is highly recommended to save the position to resume tailing.
2014-09-05 10:17:57 +0900 [info]: adding source type="tail"
2014-09-05 10:17:57 +0900 [warn]: 'pos_file PATH' parameter is not set to a 'tail' source.
2014-09-05 10:17:57 +0900 [warn]: this parameter is highly recommended to save the position to resume tailing.
2014-09-05 10:17:57 +0900 [info]: adding match pattern="**" type="stdout"
2014-09-05 10:17:57 +0900 [info]: following tail of /tmp/test.ltsv
2014-09-05 10:17:57 +0900 [info]: following tail of /tmp/test.json
[another terminal]
$ echo '{"time":"2014-09-04T12:22:09+09:00","foo":"bar"}' >> /tmp/test.json
$ echo 'time:2014-09-04T12:22:09+09:00\tfoo:bar' >> /tmp/test.ltsv
[fluentd]
1970-01-01 09:33:34 +0900 json: {"foo":"bar"}
2014-09-04 12:22:09 +0900 ltsv: {"foo":"bar"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment