Skip to content

app/vlinsert/syslog: preserve multiline messages in datagrams#1590

Open
func25 wants to merge 1 commit into
masterfrom
syslog-framing-datagram
Open

app/vlinsert/syslog: preserve multiline messages in datagrams#1590
func25 wants to merge 1 commit into
masterfrom
syslog-framing-datagram

Conversation

@func25

@func25 func25 commented Jul 10, 2026

Copy link
Copy Markdown
Member

Fixes #1573

UDP and unixgram listeners currently split syslog messages at newlines, it breaks valid multiline messages. For UDP, this documented behavior violates RFC 5426 and does not match typical user expectations.

So this change treats each datagram as a single message by default and adds a newline framing option for backward compatibility.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Re-trigger cubic

Comment on lines +45 to +51
framingUDP = flagutil.NewArrayString("syslog.framing.udp", "Message framing for the corresponding -syslog.listenAddr.udp. "+
"Supported values: datagram, newline. The default datagram mode treats every UDP packet as a single Syslog message. "+
"The newline mode splits every UDP packet into messages delimited by newline characters. See https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#message-framing")
framingUnix = flagutil.NewArrayString("syslog.framing.unix", "Message framing for SOCK_DGRAM Unix sockets at the corresponding -syslog.listenAddr.unix. "+
"Supported values: datagram, newline. The default datagram mode treats every packet as a single Syslog message. "+
"The newline mode splits every packet into messages delimited by newline characters. This flag doesn't apply to SOCK_STREAM Unix sockets. "+
"See https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#message-framing")

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. I made datagram framing as default, it changes the current behavior,
  2. as I think it is unlikely that users rely on newlines to separate multiple messages within a single UDP packet. Though I dont have enough context to be certain, so kept backward compat through these flags, but feel free to remove them to simplify the code (and docs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RFC5424 message with line-breaks is splitted into multiple messages

1 participant