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

SECURITY-ENDPOINT: add fields for events to metadata document #70491

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,13 @@ export class EndpointDocGenerator {
'@timestamp': ts,
event: {
created: ts,
id: this.seededUUIDv4(),
kind: 'metric',
category: 'host',
Copy link
Contributor

Choose a reason for hiding this comment

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

category and type can be an array per the ecs spec. I believe the endpoint will actually send these values as an array of a single value for metadata.

My suggestion would be to mimic that and do category: ['host'] type: ['info']

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

type: 'info',
module: 'endpoint',
action: 'endpoint_metadata',
dataset: 'endpoint.metadata',
},
...this.commonInfo,
};
Expand Down
7 changes: 7 additions & 0 deletions x-pack/plugins/security_solution/common/endpoint/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,13 @@ export type HostMetadata = Immutable<{
'@timestamp': number;
event: {
created: number;
kind: string;
id: string;
category: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

category and type can be an array per the ecs spec. I believe the endpoint will actually send these values as an array of a single value for metadata.

type: string;
module: string;
action: string;
dataset: string;
};
elastic: {
agent: {
Expand Down