4

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!

  • Have you looked into [throttle](https://docs.fluentbit.io/manual/pipeline/filters/throttle) – teedak8s Jun 08 '22 at 02:09
  • @teedak8s throttle helps in decreasing the number of records, however the less I was able to get was 2 logs per request, with Rate at 1 and Window at 2 – DMaxter Mar 07 '23 at 23:39

0 Answers0