Skip to content
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

Winlogbeat - include structured event data with each event #1153

Merged
merged 1 commit into from
Mar 16, 2016

Conversation

andrewkroh
Copy link
Member

Implements #1053

Changes

  • Add additional data to the events published by Winlogbeat. The new fields are activity_id,
    event_data, keywords, opcode, process_id, provider_guid, related_activity_id,
    task, thread_id, user_data. and version. Examples of the new events can be seen here.
  • The message_inserts field was replaced with the event_data field
  • The category field was renamed to task to better align with the Windows Event Log API naming

Benefits

The benefit to this change is that Winlogbeat now provides the data from the event log message in a structured format. For example, for a user login event the text from the message may be

Subject:
    Security ID:        S-1-5-21-3541430928-2051711210-1391384369-1001
    Account Name:        vagrant
    Account Domain:        VAGRANT-2012-R2
    Logon ID:        0x837F2   

and to make use of this message most users would have previously used Logstash to grok the key/value data. Now, included in the JSON event is the same data in a structured format:

  "event_data": {
    "LogonType": "8",
    "TargetDomainName": "VAGRANT-2012-R2",
    "TargetLogonId": "0x837f2",
    "TargetUserName": "vagrant",
    "TargetUserSid": "S-1-5-21-3541430928-2051711210-1391384369-1001"
  }

What's Left to Do in a Separate PR

  • Due to the refactoring which simplified how event data was retrieved from the Windows Event Log API, we lost the ability to render partial events when errors occur. I need to improve the code that interfaces to Windows so that it falls back to rendering the event without the message so that we get parts of the event without the message. Implemented in Report event log records when a rendering error occurs #1180

@ruflin
Copy link
Member

ruflin commented Mar 15, 2016

@andrewkroh Unrelated comment: I would recommend to most of the content you put into the PR description to also put it into the commit message. The reason is PR's are Github related, if someone only looks at commits for example with blame, he doesn't see all the additional info.

@@ -164,6 +221,11 @@ eventlog:
description: >
The type of account associated with this event.

- name: version
type: int
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type in elasticsearch seems to be "integer" an not "int": https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html#number Not sure if both works. We use int also in all other fields.yml so we would have to change it everywhere.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix these is a separate PR. This will change the template and mapping for these fields (long -> integer) so I want to make sure there are no unintended consequences.

@ruflin
Copy link
Member

ruflin commented Mar 15, 2016

LGTM

@andrewkroh andrewkroh force-pushed the feature/wlb-structured-event-data branch from 4fcf05d to d48c7f5 Compare March 15, 2016 13:28
@andrewkroh
Copy link
Member Author

@ruflin I agree and I amended the commit message to include more of the details I wrote in the PR. (And btw, github does associate commits to pull requests when you browse by commit. It provides a rather small link to the PR.)

@ruflin
Copy link
Member

ruflin commented Mar 15, 2016

@andrewkroh Found the link. I never saw that one before. Good to know.

The benefit to this change is that Winlogbeat now provides the data from
the event log message in a structured format so that most message no
longer require groking to extract data.

Changes
- Add additional data to the events published by Winlogbeat. The new
  fields are activity_id, event_data, keywords, opcode, process_id,
  provider_guid, related_activity_id, task, thread_id, user_data, and
  version.
- The message_inserts field was replaced with the event_data field
- The category field was renamed to task to better align with the Windows
  Event Log API naming

Closes elastic#1053
@andrewkroh andrewkroh force-pushed the feature/wlb-structured-event-data branch from d48c7f5 to 074fa5d Compare March 15, 2016 17:57
ruflin added a commit that referenced this pull request Mar 16, 2016
…-data

Winlogbeat - include structured event data with each event
@ruflin ruflin merged commit d8ca37e into elastic:master Mar 16, 2016
@andrewkroh andrewkroh deleted the feature/wlb-structured-event-data branch March 25, 2016 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants