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 ECS categories for system-host module #18031

Merged

Conversation

andrewstucki
Copy link
Contributor

@andrewstucki andrewstucki commented Apr 28, 2020

What does this PR do?

Checklist

  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

@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.

ECS categorization looks great.

Looks like we could populate the ECS host fields. Should we add that?

@andrewstucki
Copy link
Contributor Author

@leehinman so, the host fields (and more) are already actually populated in this function:

func (host *Host) toMapStr() common.MapStr {
mapstr := common.MapStr{
// https://github.com/elastic/ecs#-host-fields
"uptime": host.Uptime,
"boottime": host.Info.BootTime,
"timezone.name": host.Info.Timezone,
"timezone.offset.sec": host.Info.TimezoneOffsetSec,
"hostname": host.Info.Hostname,

We currently populate:

host.architecture
host.hostname
host.id
host.ip
host.mac
host.uptime
host.os.platform
host.os.name
host.os.family
host.os.version
host.os.kernel

Just for kicks, I added host.name too and set it to the same value as host.hostname as specified in the ECS reference docs:

Name of the host.

It can contain what hostname returns on Unix systems...

@elasticmachine
Copy link
Collaborator

elasticmachine commented May 5, 2020

💚 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 dece318 into elastic:master May 5, 2020
@andrewstucki andrewstucki deleted the auditbeat-system-host-update branch May 5, 2020 15:23
andrewstucki pushed a commit to andrewstucki/beats that referenced this pull request May 5, 2020
* [Auditbeat] Add ECS categories for system-host module

* Add changelog entry

* Add host.name

* Add host.name to ECS-only fields

* Remove added 'name' field

(cherry picked from commit dece318)
andrewstucki pushed a commit that referenced this pull request May 5, 2020
…host module (#18249)

* [Auditbeat] Add ECS categories for system-host module (#18031)

* [Auditbeat] Add ECS categories for system-host module

* Add changelog entry

* Add host.name

* Add host.name to ECS-only fields

* Remove added 'name' field

(cherry picked from commit dece318)

* Fix up changelog
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 host dataset to ECS 1.4
5 participants