fix(filters/pfsense): support hostname-less syslog headers and disambiguate CSV variants - #2549
Merged
Merged
Conversation
…iguate CSV variants
❌ Go dependencies check failedThere are outdated Go dependencies, or modules that could not be inspected. Script output |
✅ AI review — ApprovedNo issues detected in this diff. ✅
|
osmontero
approved these changes
Sep 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Detailed explanation of the changes
The pfSense filter (
filters/pfsense/pfsense_fw.yml) was adjusted in two ways:Syslog header without hostname: A variant of the header parser was added to recognize events where pfSense sends the log directly with the process (
filterlog[...]) without including the hostname.IPv4/IPv6 variant separation: The conditions that determine which message format to apply (TCP, UDP, ICMP for IPv4 and IPv6) were adjusted so that each event only enters the correct variant. Previously, some conditions overlapped and caused parsing errors when an IPv6 event mistakenly fell into an IPv4 variant.
Reasoning behind these changes
pfSense events arriving without a hostname in the header were not parsed. Additionally, even when the header was successfully parsed, some IPv6 events triggered a "column index out of range" error because multiple format variants were competing for the same event.
With these adjustments:
Both pfSense header formats (with and without hostname) are supported, without breaking compatibility with logs that were already parsing correctly.
Each event is processed by only one parser variant, eliminating the column index error and ensuring that fields are populated correctly for correlation rules.
Issue reference
#1852