-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
x-pack/winlogbeat/module/routing: set host.os.type and host.os.family in forwarded events #35435
Conversation
… in forwarded events
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
field: host.os.family | ||
value: windows | ||
override: false | ||
if: ctx.tags != null && ctx.tags.contains('forwarded') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the following config https://www.elastic.co/guide/en/beats/winlogbeat/master/configuration-winlogbeat-options.html#_event_logs_forwarded set the forwarded
tag? I'm looking at the code and I don't think so. So should we do both?
winlogbeat.event_logs:
- name: <Channel>
forwarded: true
tags: [forwarded]
For more context, we're not using the ForwardedEvents
channel, we have multitude of custom channels that intakes WEF logs from the environment to balance the load.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I spent a fair bit of time trying to sort that out. As far as I can make out, forwarded must be set by the user in the config as you have in the snippet. This is how it always appears in the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it not make sense to just if forwarded: true
to automatically add the forwarded
tag? That way users don't have to remember to do both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or perhaps instead of requiring the tag. Just check if the field isn't set, set to windows
otherwise use the provided field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config value doesn't make its way into the ingested document AFAICS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. I'm thinking in the winlogbeat code to either auto add the tag if you're going to leave the if:....
conditional on the ingest processors OR change the conditional to just always set the fields if they're not already set since I think it's a decent default to assume the OS is windows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the conditional to just always set the fields if they're not already set since I think it's a decent default to assume the OS is windows
I like this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for our purposes until this is merged and released, it looks like i'm going to use the below in our environment
- set:
field: host.os.type
value: windows
override: false
- set:
field: host.os.family
value: windows
override: false
The override logic works so if its already set, nothing changes and if not, it gets set to windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
… in forwarded events (#35435)
What does this PR do?
Sets
host.os.type
andhost.os.family
in forwarded events.Why is it important?
These fields are used in detection rules.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs