-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Robust RFC 5424, RFC 3339, ISO 8601, timestamp formatting #1862
Comments
One possible idea is supporting multiple format in To avoid current limitation, setup 2 syslog input plugins is one way. |
https://tools.ietf.org/html/rfc5424#section-6.2.3
So you should send timestamp includes TIME-SECFRAC from Windows agent. I could not find |
Any update on this? Should means the implementation is still valid if it does not send TIME-SECFRAC. https://tools.ietf.org/html/rfc2119
|
I've checked RFC5424 again. https://tools.ietf.org/html/rfc5424#section-6
|
Fix fluent#1862 Signed-off-by: Kenji Okimoto <[email protected]>
Expected Behavior
Fluentd syslog collector can collect RFC 5424 formatted syslog messages from both the Rsyslog Windows Agent, and Rsyslog Linux Agent, with or without fractional seconds, per RFC 5424, RFC 3339, and ISO 8601.
Actual Behavior
Rsyslog Linux Agent timestamp (with microseconds) is accepted, but the Rsyslog Windows Agent timestamp (without microseconds) causes errors.
Error Log
Environment
Configuration
td-agent
Rsyslog Linux Agent
Rsyslog Windows Agent
Details
The Rsyslog Windows Agent, when configured to send RFC 5424, does not include fractional seconds / microseconds in the timestamp. I found a fluentd git commit which defines the default filter, and only supports fractional seconds:
https://github.com/cosmo0920/fluentd/blob/866b2caf0891b805fca54efff6c28e10cd617f35/lib/fluent/plugin/parser_syslog.rb#L36
The RFC 5424, RFC 3339, and ISO 8601 say that fractional seconds are optional. It also mentions that the "T" and "Z" separators may be upper or lower case. Here's some examples of valid timestamps:
I've created a temporary fix, by configuring fluentd / td-agent to not look for fractional seconds, and to make the Rsyslog Linux Agent not send fractional seconds. A better long-term solution would be for the fluentd in_syslog collector to support the wider range of timestamps. Thoughts?
Work-around
fluentd / td-agent config
Rsyslog Linux 8.24.0 Agent config
Rsyslog Linux 5.8.10 Agent config
The text was updated successfully, but these errors were encountered: