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

[Auditbeat] Add system module socket dataset ECS categorization fields #18036

Merged

Conversation

andrewstucki
Copy link
Contributor

@andrewstucki andrewstucki commented Apr 28, 2020

Checklist

  • My code follows the style guidelines of this project
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

@andrewstucki andrewstucki requested a review from a team as a code owner April 28, 2020 03:59
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Apr 28, 2020
@andresrc andresrc removed the needs_team Indicates that the issue/PR needs a Team:* label label Apr 28, 2020
Copy link
Contributor

@leehinman leehinman left a comment

Choose a reason for hiding this comment

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

Couple suggestions

  • I think if we have an IPv4 or IPv6 connection we should add "connection" to event.type
  • could we add source.ip & destination.ip to related.ip if they exist?
  • could we add user.name to related.user if user.name exists?
  • I'm not sure if toEvent gets triggered at convenient times for this but do you think we could get enough info to reliably set event.type to start & stop when the flow starts & ends?

@andrewstucki
Copy link
Contributor Author

@leehinman thanks for the eyes -- to start with your last question, so the socket dataset is interesting--basically it uses kprobes to track the entire lifecycle of a flow, when the flow is terminated, the statistics aggregated across the lifetime are then sent as an event--so every flow is technically a "termination"--meaning that the notion of expressing the lifecycles ("start", "ended", etc.) doesn't really fit with what we're trying to model.

Added the related fields and technically connection will always be set because we validate that we have ipv6 or ipv4 info prior to actually serializing the event so we don't send context-divorced "partial flows", but I threw in a guard in case that changes some time in the future.

@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview stats

Expand to view the summary

Build stats

Test stats 🧪

Test Results
Failed 0
Passed 189
Skipped 17
Total 206

Copy link
Contributor

@leehinman leehinman left a comment

Choose a reason for hiding this comment

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

LGTM

@andrewstucki andrewstucki merged commit ed3a0e9 into elastic:master May 5, 2020
@andrewstucki andrewstucki deleted the auditbeat-system-socket-update branch May 5, 2020 15:19
andrewstucki pushed a commit to andrewstucki/beats that referenced this pull request May 5, 2020
elastic#18036)

* [Auditbeat] Add system module socket dataset ECS categorization fields

* Add changelog entry

* Add related fields and additional connection type

* update integration test expectations

(cherry picked from commit ed3a0e9)
andrewstucki pushed a commit that referenced this pull request May 5, 2020
#18036) (#18248)

* [Auditbeat] Add system module socket dataset ECS categorization fields

* Add changelog entry

* Add related fields and additional connection type

* update integration test expectations

(cherry picked from commit ed3a0e9)
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.

[Auditbeat] Update Auditbeat system module socket dataset to ECS 1.4
4 participants