Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time field seems not supporting miliseconds on Elasticsearch #124

Closed
davidgacc opened this issue Aug 11, 2017 · 2 comments
Closed

time field seems not supporting miliseconds on Elasticsearch #124

davidgacc opened this issue Aug 11, 2017 · 2 comments

Comments

@davidgacc
Copy link

I am following this pipeline : kinesis-lambda-ES . The time field seems not supporting miliseconds when I see on kibana:

fluentd : 0.14.19
elasticsearch : 5.3

time : May 17th 2017, 00:00:04.000

timestamp: 2017-05-17 00:00:04,244

This is my conf:

<source>
        @type tail
        path /path/to/log/test_900.log
        pos_file /var/log/td-agent/td-agent-test-117.log
        read_from_head true
        format multiline
        format_firstline /[0-9]+-[0-9]+-[0-9]+/
        format1 /^(?<timestamp>[0-9]+-[0-9]+-[0-9]+\s+[0-9]+:[0-9]+:[0-9]+,[0-9]+)\s+(?<log_level>[a-zA-Z]+)\s+\[(?<class>.*)\]\s+\((?<thread_pool>.*)\)\s+(?<log_message>.*)/
        keep_time_key true
        time_key timestamp
        #read_lines_limit 10000
        time_format %Y-%m-%d %H:%M:%S,%L # %L-> miliseconds ref : http://ruby-doc.org/stdlib-1.9.3/libdoc/date/rdoc/DateTime.html
        tag kinesis-test.log
</source>

## Send Data to Kinesis Stream
<match *.**>
        @type copy
        <store>
                @type kinesis_producer
                region us-east-1
                stream_name stream-activation
                include_time_key true
        </store>
</match>

Any ideas? I would appreciate your help.

Thank you,
David

@riywo
Copy link
Contributor

riywo commented Sep 20, 2017

Hi @davidgacc ,

Thank you for reporting this. I have to dig into this issue. It seems that sub-second information is dropped somewhere inside plugin. Seems related to #87 , but not sure.

@riywo
Copy link
Contributor

riywo commented Sep 21, 2017

I've released v2.0.0.rc.2.0 and it supports nanosecond format time_key with proper format for Elasticsearch. The config could be like below:

<match *>
  @type kinesis_streams

  <inject>
    time_key time
  </inject>
</match>

@riywo riywo closed this as completed Sep 21, 2017
@riywo riywo mentioned this issue Sep 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants