-
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
Migrate Winlogbeat to ECS #10169
Migrate Winlogbeat to ECS #10169
Conversation
This PR is to kick of a discussion around Winlogbeat and ECS migration.
@webmat @andrewkroh I kicked this off for the changes in ECS. The part I'm not very clear here is which fields are very event log specific and which ones actually should we map to ECS. Could you have a look and leave your comments? This is not complete yet but should have questions for all the relevant fields. |
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.
I'm proposing two adjustments to @ruflin's proposed field renames.
Here are some more ideas of field transitions that may make sense:
keywords
=> does this map totags
?source_name
=>process.name
@@ -31,7 +32,8 @@ | |||
activity. | |||
|
|||
- name: computer_name | |||
type: keyword | |||
type: alias | |||
path: host.name |
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.
Rather host.hostname
. host.name
is meant to be overridable.
@@ -116,7 +123,8 @@ | |||
the event. | |||
|
|||
- name: process_id | |||
type: long | |||
type: alias | |||
path: process.id |
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.
process.pid
@@ -49,7 +51,8 @@ | |||
earlier versions of Windows. | |||
|
|||
- name: event_id | |||
type: long | |||
type: alias | |||
path: event.id |
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.
This is not the same as ECS event.id
(at least in my understanding). This more like an identifier for the log message in the application. For example 1102 is "The audit log was cleared".
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.
record_number
is closer to event.id
but it's only unique given some additional constraints. If we wanted to populate event.id
I'd do a fast hash of @timestamp + computer_name + log_name + record_number.
@@ -139,7 +139,7 @@ func (e Record) ToEvent() beat.Event { | |||
// MapStr. | |||
func addOptional(m common.MapStr, key string, v interface{}) { | |||
if m != nil && !isZero(v) { | |||
m[key] = v |
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.
A few lines up...
e.TimeCreated.SystemTime
is used to populate @timestamp
. That's the time the event was originally logged. So it would be nice to populate event.created
with the current time.
type: keyword | ||
# This does not exist yet | ||
path: log.name | ||
type: alias |
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.
I'd like to understand better the relation between log_name
and source_name
. Is there a place where we can see sample data? I haven't found anything obvious.
This PR is to kick of a discussion around Winlogbeat and ECS migration.