cisco_asa: relax some grok rules for divergent logs#3943
Merged
efd6 merged 2 commits intoelastic:mainfrom Aug 10, 2022
Merged
Conversation
|
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
🌐 Coverage report
|
r00tu53r
reviewed
Aug 8, 2022
| patterns: | ||
| - ^%{NOTSPACE:event.outcome} ((protocol %{POSINT:network.iana_number})|%{NOTSPACE:network.transport}) src %{NOTCOLON:_temp_.cisco.source_interface}:%{IPORHOST:source.address}(/%{POSINT:source.port})?\s*(\(%{CISCO_USER:_temp_.cisco.source_username}\) )?dst %{NOTCOLON:_temp_.cisco.destination_interface}:%{IPORHOST:destination.address}(/%{POSINT:destination.port})?%{DATA}by access-group "%{NOTSPACE:_temp_.cisco.list_id}" | ||
| pattern_definitions: | ||
| HOSTNAME: "\\b(?:[0-9A-Za-z][0-9A-Za-z-_]{0,62})(?:\\.(?:[0-9A-Za-z_][0-9A-Za-z-_]{0,62}))*(\\.?|\\b)" |
Contributor
There was a problem hiding this comment.
Any reason for adding underscore (_) to the HOSTNAME regex ? I missed seeing an event for this case.
r00tu53r
approved these changes
Aug 10, 2022
Some hostnames include characters ('_') that do not comply with RFC952 and
RFC1123. This change allows those hostnames to be parsed. Since there is no RFC
to fall back on here, the rules used for hyphen is used for underscore.
Note that the pattern here is derived from the well known grok patterns collection
which allows a terminal hyphen, at odds with the RFCs.
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.
What does this PR do?
Fixes grok handling of a variety of non-canonical log formats.
Checklist
changelog.ymlfile.Author's Checklist
How to test this PR locally
Related issues
Screenshots