[syslog_router] Rename message to event.original - #16164
Conversation
🚀 Benchmarks reportTo see the full report comment with |
💚 Build Succeeded
History
cc @ilyannn |
|
My thoughts on this:
If an event lands in the syslog_router log data stream, that means it was never routed in the first place and ended up there as a last resort. The pipeline for this data stream was never meant to do any sort of processing other than the bare minimum (which may include the creation of the event.original field). For logs that do get routed, the event should contain the At least for the syslog_router log data stream, the message field should NOT be removed. I'm not entirely sure how reindexing works with routing rules, but if for example the user fixed an issue with the routing logic and reindexed events in the log data stream, it would in theory allow the routing logic to try to reroute events again. The routing logic depends entirely on the message field being present. Most integrations tolerate the presence of event.original, so this shouldn't be an issue.
I think based on how the syslog_router data stream works (it's a last resort catch all), I don't want to give extra functionality to it.
See my first point, syslog_router should not do extra processing.
This is not surprising, since the pipeline does so little in the first place. Any change is going to cause a "big" speed change in the benchmark. I've also noticed that benchmarks can be wildly inaccurate and it takes multiple runs to get a stable number (if it ever gets stable). So to summarize, I could see us creating the event.original field, but NOT removing the message field. |
|
After the consultation with the team – let's keep the pipeline as-is. |
Context
The syslog_router integration (original PR: #11727) never had the
renameprocessor that would createevent.original. This is suboptimal and also means that the fix applied in #15806 never really worked.This PR
We add such a processor, copying it – together with a hash in the tag – from another pipeline. As required by the pipeline spec we also add a
removeprocessor for themessagefield.Note on this solution
Apparently doing a global rename of
message→event.originalfor logs flowing through this integration might break the workflow of people who currently use this integration and have set up a custom pipeline to processmessage. We have therefore several choices how to proceed:renameif they desire.event.originalinstead of renaming, iff there is apreserve_original_eventtag. We'll need to make sure that the integrations we route to don't break because of this change. Also this might make customers unhappy by duplicating the data (but only in the case when this tag is set, so they have control over it).Additionally we're getting -72% on the benchmark speed with this PR. This is probably concerning.
Anyway I've set the PR back to draft mode until we decide.
Proposed commit message
[syslog_router] Rename message to event.original
Adds the standard rename of message to event.original to the the syslog router integration.
Checklist
[ ] I have verified that all data streams collect metrics or logs.changelog.ymlfile.[ ] I have verified that Kibana version constraints are current according to guidelines.[ ] I have verified that any added dashboard complies with Kibana's Dashboard good practicesHow to test this PR locally
Warning
Due to limitations in
elastic-package, automated tests cannot verify routing behavior to data streams external to this package. Verification will have to be performed manually. To verify, follow the instructions in the integration on installing assets for another integration (Cisco ASA, for example), configure the integration, and send a relevant log to the Agent.