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

Fluentbit output to elasticsearch is missing milliseconds on @timestamp #2476

Closed
FarhadF opened this issue Aug 19, 2020 · 5 comments
Closed
Labels

Comments

@FarhadF
Copy link

FarhadF commented Aug 19, 2020

Bug Report

Describe the bug

Fluentbit output to elasticsearch is missing milliseconds on @timestamp

config:

[FILTER]
    Name parser
    Match *
    Key_Name log
    Parser json
    Reserve_Data True

[OUTPUT]
    Name es
    Match *
    Host XXX
    Logstash_Prefix my_prefix
    Logstash_Format On
    Type _doc
    Trace_Output On

Version: Fluent Bit v1.4.2

Example record(please note the 000 in @timestamp (this is from the trace output of es plugin):

{"@timestamp":"2020-08-19T09:39:29.000Z","level":"error","timestamp":"2020-08-19T09:39:29.996959864Z","message":"Failed to retrieve queue url"}

Actual log line from the application:

{"level":"error","timestamp":"2020-08-19T09:39:29.996959864Z","message":"Failed to retrieve queue url"}
@FarhadF
Copy link
Author

FarhadF commented Aug 19, 2020

Things I tried:

  • changing Flush to 0.5, still no milliseconds.
  • set Time_Key_Format
  • trying my config locally (just changed INPUT to tail to read from file) -> this works correctly
{"@timestamp":"2020-08-19T11:47:06.540Z","level":"error","timestamp":"2020-08-19T09:57:29.996959864Z","message":"Failed to retrieve queue url"}

@FarhadF
Copy link
Author

FarhadF commented Aug 20, 2020

One workaround would be to parse application timestamp key in parser and replace @timestamp

@zihengCat
Copy link
Contributor

@FarhadF Hi, check this PR #2544 out.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Apr 27, 2021
@github-actions
Copy link
Contributor

github-actions bot commented May 4, 2021

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as completed May 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants