forked from fluent/fluent-bit
-
Notifications
You must be signed in to change notification settings - Fork 0
Parser fixes #2
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
Open
hlein
wants to merge
17
commits into
parsers-yaml
Choose a base branch
from
parser-fixes
base: parsers-yaml
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Parser fixes #2
Conversation
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
Owner
Author
|
Multiple test runs. Simplified output after the
After the final commit, behavior changes: But of course that's not really a fail, because macsrc/macdst flipping is the point. Same thing with iptables tests after the latest improvements: |
3 tasks
Single-quote regexes and do not use unnecessary / / delimeters. Signed-off-by: Hank Leininger <hlein@korelogic.com>
No change in behavior, confirmed w/test harness. Signed-off-by: Hank Leininger <hlein@korelogic.com>
Linux kernel uptime timestamps use "[%5lu.%06lu]", meaning there are leading spaces inside the [ ] until uptime reaches 10,000 secs. The existing test-cases both have 6-digit seconds, so this wasn't noticed. Signed-off-by: Hank Leininger <hlein@korelogic.com>
Linux firewall logs' MAC= field is in wire order - dst MAC, then src MAC, then ethertype. Signed-off-by: Hank Leininger <hlein@korelogic.com>
Pulled these out of https://hackmd.io/@njjack/syslogformat, I _think_ all three are valid. The current pattern only matches on the first two. Signed-off-by: Hank Leininger <hlein@korelogic.com>
See https://hackmd.io/@njjack/syslogformat With this change, we match the third test-case as well. Signed-off-by: Hank Leininger <hlein@korelogic.com>
… case Signed-off-by: Hank Leininger <hlein@korelogic.com>
No change in behavior, confirmed w/test harness. Signed-off-by: Hank Leininger <hlein@korelogic.com>
Signed-off-by: Hank Leininger <hlein@korelogic.com>
Signed-off-by: Hank Leininger <hlein@korelogic.com>
Strictly OK/FAIL when the before-after don't match is less useful when we are making improvements that introduce changes on purpose. Change labels to MATCH/NO MATCH, and also add -c which shows the wc of output lines - much easier to confirm when updates cause more tests to successfully match. Signed-off-by: Hank Leininger <hlein@korelogic.com>
Also more whitespace and comments for legibility. Signed-off-by: Hank Leininger <hlein@korelogic.com>
The previous implementation would clobber and only remember one.
This field name is now a misnomer, pkt_flags or individual ones
for pkt_{cwr,ewe,urg...} might be better, but would break backwards
compat more substantially.
Signed-off-by: Hank Leininger <hlein@korelogic.com>
…rted Other firewall-building tools (UFW, firewalld, etc.) craft their line prefix differently, causing the rest of the regex to fail. Also some errors and more exotic message contents. Signed-off-by: Hank Leininger <hlein@korelogic.com>
Address prefixes added by different tools, parse payloads in ICMP errors, support --log-uid logs, etc. Note that this _does_ change or rename a few fields, it is not strictly additive. Also switch regex reference to one that matches fluent-bit behavior. Signed-off-by: Hank Leininger <hlein@korelogic.com>
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.
Various cleanups and improvements to parser regexes in
.yamlconfig files.Enter
[N/A]in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
ok-package-testlabel to test for all targets (requires maintainer to do).Documentation
Backporting
Does not really need backporting. Similar changes might be needed in
.conffiles if they are not pruned (see fluent#11161 (comment))Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.