From 1cf1cd7aa0437a5b422d61718e6fb68a4190acf3 Mon Sep 17 00:00:00 2001 From: nnamdifrankie Date: Wed, 1 Jul 2020 14:14:54 -0400 Subject: [PATCH 1/2] EMT-492: add fields for events to metadata document --- .../security_solution/common/endpoint/generate_data.ts | 7 +++++++ x-pack/plugins/security_solution/common/endpoint/types.ts | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/x-pack/plugins/security_solution/common/endpoint/generate_data.ts b/x-pack/plugins/security_solution/common/endpoint/generate_data.ts index 563e2e4ccc9f2..9a10e1e67a5e8 100644 --- a/x-pack/plugins/security_solution/common/endpoint/generate_data.ts +++ b/x-pack/plugins/security_solution/common/endpoint/generate_data.ts @@ -363,6 +363,13 @@ export class EndpointDocGenerator { '@timestamp': ts, event: { created: ts, + id: this.seededUUIDv4(), + kind: 'metric', + category: 'host', + type: 'info', + module: 'endpoint', + action: 'endpoint_metadata', + dataset: 'endpoint.metadata', }, ...this.commonInfo, }; diff --git a/x-pack/plugins/security_solution/common/endpoint/types.ts b/x-pack/plugins/security_solution/common/endpoint/types.ts index 72839a8370495..ae31f8f3d924a 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types.ts @@ -399,6 +399,13 @@ export type HostMetadata = Immutable<{ '@timestamp': number; event: { created: number; + kind: string; + id: string; + category: string; + type: string; + module: string; + action: string; + dataset: string; }; elastic: { agent: { From 9788783ca2e7511603cf7580b025f0c63093cd42 Mon Sep 17 00:00:00 2001 From: nnamdifrankie Date: Wed, 1 Jul 2020 16:13:49 -0400 Subject: [PATCH 2/2] EMT-492: fix types --- .../security_solution/common/endpoint/generate_data.ts | 8 ++++---- x-pack/plugins/security_solution/common/endpoint/types.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/x-pack/plugins/security_solution/common/endpoint/generate_data.ts b/x-pack/plugins/security_solution/common/endpoint/generate_data.ts index 9a10e1e67a5e8..e3c6f03cd06aa 100644 --- a/x-pack/plugins/security_solution/common/endpoint/generate_data.ts +++ b/x-pack/plugins/security_solution/common/endpoint/generate_data.ts @@ -365,8 +365,8 @@ export class EndpointDocGenerator { created: ts, id: this.seededUUIDv4(), kind: 'metric', - category: 'host', - type: 'info', + category: ['host'], + type: ['info'], module: 'endpoint', action: 'endpoint_metadata', dataset: 'endpoint.metadata', @@ -1191,8 +1191,8 @@ export class EndpointDocGenerator { created: ts, id: this.seededUUIDv4(), kind: 'state', - category: 'host', - type: 'change', + category: ['host'], + type: ['change'], module: 'endpoint', action: 'endpoint_policy_response', dataset: 'endpoint.policy', diff --git a/x-pack/plugins/security_solution/common/endpoint/types.ts b/x-pack/plugins/security_solution/common/endpoint/types.ts index ae31f8f3d924a..94d6c67e17918 100644 --- a/x-pack/plugins/security_solution/common/endpoint/types.ts +++ b/x-pack/plugins/security_solution/common/endpoint/types.ts @@ -401,8 +401,8 @@ export type HostMetadata = Immutable<{ created: number; kind: string; id: string; - category: string; - type: string; + category: string[]; + type: string[]; module: string; action: string; dataset: string; @@ -778,8 +778,8 @@ export interface HostPolicyResponse { created: number; kind: string; id: string; - category: string; - type: string; + category: string[]; + type: string[]; module: string; action: string; dataset: string;