Skip to content

Conversation

@marcosdiez
Copy link
Contributor

This is the 1.8 backport of #4811

To keep things simpler, I only cherry-picked the first commit, so the refactoring part won't get back ported. All the info (example configuraton, etc) from this PR is the same as the original one.

Just like the other commit, fluent/fluent-bit-docs#708 is the documentation that should be merged as well.


Enter [N/A] in the box, if an item is not applicable to your change.

Testing
Before we can approve your change; please submit the following in a comment:

  • [ X] Example configuration file for the change
  • [X ] Debug log output from testing the change
  • [X ] Attached Valgrind output that shows no leaks or memory corruption was found

If this is a change to packaging of containers or native binaries then please confirm it works for all targets.

Documentation

  • [X ] Documentation required for this feature

Backporting

  • [X ] Backport to latest stable release.

Debug log output from testing the change

Fluent Bit v1.8.13
* Copyright (C) 2015-2021 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2022/02/14 19:12:17] [Warning] [config] I cannot open /mnt/extra/u/rootfs/home/ubuntu/code/fluent-bit/build/plugins.conf file
[2022/02/14 19:12:17] [ info] [engine] started (pid=561691)
[2022/02/14 19:12:17] [ info] [storage] version=1.1.6, initializing...
[2022/02/14 19:12:17] [ info] [storage] in-memory
[2022/02/14 19:12:17] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2022/02/14 19:12:17] [ info] [cmetrics] version=0.2.2
[2022/02/14 19:12:17] [ info] [sp] stream processor started
[{"date":"2022-02-14 22:12:18.183701","message":"dummy"}]

valgrind*

==561694== Memcheck, a memory error detector
==561694== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==561694== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==561694== Command: ./fluent-bit -c ../test.conf
==561694==
Fluent Bit v1.8.13
* Copyright (C) 2015-2021 The Fluent Bit Authors
* Fluent Bit is a CNCF sub-project under the umbrella of Fluentd
* https://fluentbit.io

[2022/02/14 19:12:31] [Warning] [config] I cannot open /mnt/extra/u/rootfs/home/ubuntu/code/fluent-bit/build/plugins.conf file
[2022/02/14 19:12:31] [ info] [engine] started (pid=561694)
[2022/02/14 19:12:31] [ info] [storage] version=1.1.6, initializing...
[2022/02/14 19:12:31] [ info] [storage] in-memory
[2022/02/14 19:12:31] [ info] [storage] normal synchronization mode, checksum disabled, max_chunks_up=128
[2022/02/14 19:12:31] [ info] [cmetrics] version=0.2.2
[2022/02/14 19:12:31] [ info] [sp] stream processor started
[{"date":"2022-02-14 22:12:32.189422","message":"dummy"}]
^C[2022/02/14 19:12:37] [engine] caught signal (SIGINT)
[2022/02/14 19:12:37] [ warn] [engine] service will shutdown in max 5 seconds
[2022/02/14 19:12:38] [ info] [engine] service has stopped (0 pending tasks)
==561694==
==561694== HEAP SUMMARY:
==561694==     in use at exit: 0 bytes in 0 blocks
==561694==   total heap usage: 3,247 allocs, 3,247 frees, 806,504 bytes allocated
==561694==
==561694== All heap blocks were freed -- no leaks are possible
==561694==
==561694== For lists of detected and suppressed errors, rerun with: -s
==561694== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)



Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

This commit adds a new timestamp format, the java_sql_timestamp,
which is very similar to iso8601, except that it has a space instead
of a T between the date and the hour and does not end with Z
(or any other timestamp delimiter)

This is the format: "%Y-%m-%d %H:%M:%S"

This is unfortunatelly the only format accepted by Amazon Athena.

Signed-off-by: Marcos Diez <[email protected]>
@marcosdiez marcosdiez changed the title pack: added java_sql_timestamp, a format string used by amazon athena 1.8: pack: added java_sql_timestamp, a format string used by amazon athena Feb 15, 2022
@edsiper edsiper merged commit ccd8c53 into fluent:1.8 Feb 17, 2022
@edsiper
Copy link
Member

edsiper commented Feb 17, 2022

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants