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

Cherry-pick #10500 to 6.x: [Auditbeat] System module: Add entity_id fields #10569

Closed
wants to merge 1 commit into from

Conversation

cwurm
Copy link
Contributor

@cwurm cwurm commented Feb 5, 2019

Cherry-pick of PR #10500 to 6.x branch. Original message:

Implements {entity}.entity_id as a SHA-256 hash as proposed in #10463.

The new fields and what goes in the hash:

Field Hash components
system.audit.package.entity_id host.id + name + version
process.entity_id host.id + PID + StartTime
socket.entity_id host.id + inode + LocalIP + RemoteIP + LocalPort + RemotePort
user.entity_id host.id + UID + username

Note: socket is a net new top-level object, I just didn't see where else to put it. Open to suggestions.

host.id is retrieved when the system module is created and stored so the individual datasets don't have to re-fetch it. It's exposed to all through a new SystemMetricSet.

Closes #10463.

Implements `{entity}.entity_id` as a SHA-256 hash as proposed in elastic#10463.

Closes elastic#10463.

(cherry picked from commit c047ef7)
@@ -170,6 +171,15 @@ func (user User) toMapStr() common.MapStr {
return evt
}

// entityID creates an ID that uniquely identifies this user across machines.
func (u User) entityID(hostID string) string {

Choose a reason for hiding this comment

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

receiver name u should be consistent with previous receiver name user for User

}

// SystemMetricSet extends the Metricbeat BaseMetricSet.
type SystemMetricSet struct {

Choose a reason for hiding this comment

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

type name will be used as system.SystemMetricSet by other packages, and that stutters; consider calling this MetricSet

@cwurm cwurm closed this Feb 5, 2019
@cwurm cwurm deleted the backport_10500_6.x branch February 5, 2019 14:25
@cwurm cwurm restored the backport_10500_6.x branch February 5, 2019 14:25
@cwurm cwurm deleted the backport_10500_6.x branch February 5, 2019 16:21
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