how to configure syslog input to support each of t...
# fluent-bit
d
how to configure syslog input to support each of the following (not all together):
TCP_Framing="octet-counted"
• RFC 6587 compliant — each message is prefixed with its length in decimal, followed by a space.
TCP_Framing="traditional"
• Messages are terminated by the NUL (
\0
) character
. • Simpler, but not RFC compliant — works if the receiver expects null-delimited messages.
TCP_Framing="non-transparent"
• Also per RFC 6587 — messages end with a newline (
\n
) character. • Called “non-transparent” because if the message itself contains newlines, it breaks parsing. • Only safe if you know messages won’t contain embedded
\n
characters. At a moment, I am able only to receive
traditional
syslog messages .
p
I thought you could specify the separator for the input?
You can't handle different types in the same input if that's what you mean, i.e. with different separators
d
My idea is to have separate input on separate ports, however except traditional type other two doesn't work if set separately. My test client is rsyslog
just a second ...
I have very wired log record ... If I do not restart fluent-bit service , and change from type to type in rsyslog configuration stop-start rsyslog fluent bit goes from parsed (traditional) to unparsed (error) for octet-counted and non-transparent (should be O.K.) ... how ever if I stop-start fluent-bit on same time traditional work like expected, non-transparent doesn't show anything long time, and octed-counted [2025/08/13 075417] [debug] [inputsyslogsyslog.1] fd=54 incoming data exceed limit (9000 bytes)
intentionaly I lowerd buffer size
I litle bit look in plugin code and think that the following snippet is responsible for the behavior I have :
Copy code
/* Always parse while some remaining bytes exists */
    while (eof < end) {
        /* Lookup the ending byte */
        eof = p = conn->buf_data + conn->buf_parsed;
        while (*eof != '\n' && *eof != '\0' && eof < end) {
            eof++;
        }

        /* Incomplete message */
        if (eof == end || (*eof != '\n' && *eof != '\0')) {
            break;
        }
but is unclear way \n doesnt work correctly
just to notice all thouse is conected with TCP connection and not UDP 🙂
do some other research i can found follow https://graylog.org/post/syslog-protocol-a-reference-guide/
according this existing syslog input pluging dosnt correctly manage TCP like transport system for syslog messages
if I correctly read source code , it will be nice to support octet-counted and non-transparent, and use existing code for traditional . From my point of view, except adding code , we will need at least two config variables:
tcp_framing
and
tcp_nt_character