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

Added Time Format conversion using lua script through filter in "Lua filter" #1417

Conversation

fahadahammed
Copy link
Contributor

The changes are mostly to show an example how to lua script does help to manipulate json data, in this case, change datetime format of a key.

@fahadahammed fahadahammed requested review from a team as code owners July 31, 2024 18:59
@fahadahammed
Copy link
Contributor Author

Example output:

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

______ _                  _    ______ _ _           _____  __  
|  ___| |                | |   | ___ (_) |         |____ |/  | 
| |_  | |_   _  ___ _ __ | |_  | |_/ /_| |_  __   __   / /`| | 
|  _| | | | | |/ _ \ '_ \| __| | ___ \ | __| \ \ / /   \ \ | | 
| |   | | |_| |  __/ | | | |_  | |_/ / | |_   \ V /.___/ /_| |_
\_|   |_|\__,_|\___|_| |_|\__| \____/|_|\__|   \_/ \____(_)___/

[2024/08/01 00:56:25] [ info] [fluent bit] version=3.1.4, commit=, pid=78924
[2024/08/01 00:56:25] [ info] [storage] ver=1.5.2, type=memory, sync=normal, checksum=off, max_chunks_up=128
[2024/08/01 00:56:25] [ info] [cmetrics] version=0.9.1
[2024/08/01 00:56:25] [ info] [ctraces ] version=0.5.2
[2024/08/01 00:56:25] [ info] [input:dummy:dummy.0] initializing
[2024/08/01 00:56:25] [ info] [input:dummy:dummy.0] storage_strategy='memory' (memory only)
[2024/08/01 00:56:25] [ info] [input:dummy:dummy.1] initializing
[2024/08/01 00:56:25] [ info] [input:dummy:dummy.1] storage_strategy='memory' (memory only)
[2024/08/01 00:56:25] [ info] [sp] stream processor started
[2024/08/01 00:56:25] [ info] [output:stdout:stdout.0] worker #0 started
[0] event_category_a: [[1722452186.727104902, {}], {"event"=>"Restock", "pub_date"=>"2024-07-30T18:01:06Z"}]
[0] event_category_b: [[1722452186.730255842, {}], {"event"=>"Soldout", "pub_date"=>"2024-07-29T04:15:00Z"}]

@fahadahammed fahadahammed force-pushed the example/timeformat-convert-using-lua-filter branch from 6115bb1 to baff91b Compare July 31, 2024 19:03
@fahadahammed fahadahammed force-pushed the example/timeformat-convert-using-lua-filter branch from c3ad9f3 to 98070d0 Compare August 1, 2024 09:19
@fahadahammed
Copy link
Contributor Author

@patrick-stephens Please let me know if anything I need to add or modify to make it mergeable. Thanks.

@patrick-stephens
Copy link
Contributor

Looks ok from a tech perspective to me but I'll let the tech writers team confirm the rest

pipeline/filters/lua.md Outdated Show resolved Hide resolved
pipeline/filters/lua.md Outdated Show resolved Hide resolved
pipeline/filters/lua.md Outdated Show resolved Hide resolved
Copy link
Contributor

@cnorris-cs cnorris-cs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left comments and suggestions, but I've added my approval based on those to keep this moving.

fahadahammed and others added 3 commits August 1, 2024 18:16
Co-authored-by: Craig Norris <[email protected]>
Signed-off-by: Fahad Ahammed <[email protected]>
Co-authored-by: Craig Norris <[email protected]>
Signed-off-by: Fahad Ahammed <[email protected]>
Co-authored-by: Craig Norris <[email protected]>
Signed-off-by: Fahad Ahammed <[email protected]>
@patrick-stephens patrick-stephens merged commit 3f17bde into fluent:master Aug 1, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants