Search code examples
fluent-bit

Find Messages causing Fluent Bit parsing errors


I'm using the JSON parser with Fluent Bit. Occasionally I get the following message in the syslog.

Jul 14 01:08:12 servername td-agent-bit[373138]: [2022/07/14 01:08:12] [ warn] [input:syslog:syslog.1] error parsing log message with parser 'json'

Is there a way to tell which log line caused this issue? In my case these are being pushed to Fluent Bit using a local socket, so the message doesn't live in a file anywhere.

Is there anywhere Fluent Bit would store the failed message, or any way to request Fluent Bit to save it? Would I need to switch to something like a TCP listener so that we could theoretically make the sending side detect the failure and write the line elsewhere?


Solution

  • Enable the debug log level and you'll see a line like unparsed log message: YOUR_MESSAGE

    [SERVICE]
        ...
        log_level debug