Fluentbit http output - send one log per request

Viewed 794

I'm trying to get fluenbit (td-agent-bit-1.6.3-win64) to send log lines from a file to a HTTP endpoint. My problem is, that the endpoint can only accept 1 JSON object by POST at a time, and it looks like fluentbit always sends several JSON objects in a batch to the endpoint. My configuration is:

[SERVICE]
    flush 2
    daemon off
    log_level debug
    
[INPUT]
    name tail
    path c:\something\*.log
    refresh_interval 2

[OUTPUT]
    name http
    match *
    host myhost
    port 1234
    uri /something/logs
    header content-type application/json
    format json_stream

According to the docs, there are several formats for this output (https://docs.fluentbit.io/manual/pipeline/outputs/http)

I've tried using the json output format, but that sends multiple JSON objects wrapped by an array. The json_stream format appears to send multiple JSON objects as well, separated by commas And the json_lines also sends multiple objects.

I'd really appreciate any help with getting fluentbit to POST my logs one at a time

Thanks!

0 Answers
Related