Skip to content

feat(logs): add syslog format detection, ISO timestamp parser, and observedTimestamp fallback#1807

Merged
timojohlo merged 3 commits into
mainfrom
feat/syslog-iso-parser-and-format-attribute
Jul 15, 2026
Merged

feat(logs): add syslog format detection, ISO timestamp parser, and observedTimestamp fallback#1807
timojohlo merged 3 commits into
mainfrom
feat/syslog-iso-parser-and-format-attribute

Conversation

@timojohlo

@timojohlo timojohlo commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a third router route to detect non-standard syslog messages that use RFC 3164 structure with ISO 8601 timestamps (commonly emitted by VMware ESXi/vSAN appliances)
  • Add a regex parser to extract priority, timestamp, hostname, and message from these ISO-format messages, fixing logs that previously ended up with @timestamp = 1970-01-01T00:00:00Z
  • Add attributes.log.syslog.format label to all syslog logs with values: rfc5424, rfc3164, rfc3164_iso8601, or unknown
  • Add transform/syslog_observed_timestamp_fallback processor that uses observedTimestamp as fallback when no timestamp could be parsed from the log body (unknown format / garbage messages)
  • Add comments to the router explaining the different syslog format patterns

Problem

Some syslog senders emit messages in a non-standard format:

<12>2026-01-15T09:34:11.260Z hostname PROCESS: message...

This doesn't match RFC 5424 (missing version number) or RFC 3164 (ISO timestamp instead of BSD Mmm dd HH:MM:SS), so these messages fell through to the default route with no timestamp parsing, resulting in @timestamp = 1970-01-01T00:00:00Z.

Additionally, some messages arrive with no syslog header at all (e.g. continuation lines from multi-line messages), which also end up at epoch time.

Changes

File Change
_syslog-config.tpl New ISO route + regex parser + format labels + comments (both TCP and TLS receivers)
_syslog-audit-filter-config.tpl New transform/syslog_observed_timestamp_fallback processor
Chart.yaml Version bump 0.4.120.4.13
plugindefinition.yaml Version bump 0.15.120.15.13 / chart ref 0.4.120.4.13

Testing

Deployed and validated on a QA cluster. Both external-collector pods started cleanly with 0 errors and 0 restarts. Confirmed:

  • New ISO-format messages get correct timestamps
  • log.syslog.format attribute is populated on all syslog logs
  • Unknown format logs use observedTimestamp instead of epoch

…servedTimestamp fallback

- Add router route for non-standard RFC 3164 with ISO 8601 timestamps (VMware ESXi/vSAN)
- Add regex parser to extract timestamp, hostname, priority from ISO format messages
- Add attributes.log.syslog.format label (rfc5424, rfc3164, rfc3164_iso8601, unknown)
- Add transform/syslog_observed_timestamp_fallback to use observedTimestamp when no
  timestamp could be parsed (fixes 1970 epoch timestamps for unknown format logs)
- Add comments explaining the different syslog format routes
@timojohlo
timojohlo force-pushed the feat/syslog-iso-parser-and-format-attribute branch from b9f0ed0 to d9d42d3 Compare July 10, 2026 10:59
@timojohlo
timojohlo marked this pull request as ready for review July 10, 2026 11:13
@timojohlo
timojohlo requested a review from a team as a code owner July 10, 2026 11:13
Copilot AI review requested due to automatic review settings July 10, 2026 11:13

Copilot AI 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.

Pull request overview

Adds enhanced syslog handling in the logs chart to correctly classify and timestamp non-standard RFC3164-like syslog messages that use ISO 8601 timestamps (notably VMware ESXi/vSAN), and introduces an observed-timestamp fallback to avoid epoch timestamps when parsing fails.

Changes:

  • Added syslog routing + parsing for ISO 8601 “RFC3164-like” messages and set attributes.log.syslog.format for TCP/TLS syslog ingestion.
  • Added transform/syslog_observed_timestamp_fallback and wired it into syslog pipelines to avoid @timestamp = 1970-01-01T00:00:00Z when parsing fails.
  • Bumped chart and plugin definition versions.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
logs/charts/templates/_syslog-config.tpl Adds syslog format routing, ISO regex parsing, and format labeling; wires observed-timestamp fallback into syslog pipelines.
logs/charts/templates/_syslog-audit-filter-config.tpl Defines the new observed-timestamp fallback transform processor.
logs/charts/Chart.yaml Helm chart version bump to 0.4.13.
logs/plugindefinition.yaml Plugin/chart version reference bump to 0.15.13 / 0.4.13.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread logs/charts/templates/_syslog-config.tpl
Comment thread logs/charts/templates/_syslog-config.tpl
Comment thread logs/charts/templates/_syslog-config.tpl
… to UDP receiver

- Change timestamp layout from 'Z' to 'Z07:00' to parse both UTC (Z) and
  offset (+HH:MM) timestamps in the ISO 8601 regex parser
- Add attributes.log.syslog.format=rfc3164 to the UDP syslog receiver for
  consistent format labeling across all syslog paths

Addresses Copilot review feedback on PR #1807.
Signed-off-by: Timo <32620814+timojohlo@users.noreply.github.com>
@timojohlo
timojohlo merged commit ba62a69 into main Jul 15, 2026
7 checks passed
@timojohlo
timojohlo deleted the feat/syslog-iso-parser-and-format-attribute branch July 15, 2026 08:29
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.

3 participants