Created
November 2, 2021 20:53
-
-
Save jharley/6fbcb6125a15ec7bdabe1f395c885b63 to your computer and use it in GitHub Desktop.
fluent-bit to Honeycomb.io Events API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[INPUT] | |
Name dummy | |
[FILTER] | |
Name lua | |
Match * | |
script hny_event_filter.lua | |
call hny_format_filter | |
[OUTPUT] | |
# honeycomb.io | |
Name http | |
Match * | |
Host api.honeycomb.io | |
Port 443 | |
TLS on | |
# needed on macOS via brew | |
#TLS.ca_file /usr/local/Cellar/ca-certificates/2021-10-26/share/ca-certificates/cacert.pem | |
URI /1/batch/logging-poc | |
Format json | |
json_date_key false | |
Header X-Honeycomb-Team ${HONEYCOMB_API_KEY} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hny_format_filter(tag, timestamp, record) | |
new_record = {} | |
new_record["data"] = record | |
new_record["time"] = os.date("!%Y-%m-%dT%T", timestamp) | |
return 1, timestamp, new_record | |
end |
Author
jharley
commented
Nov 2, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment