[Security Solution] add agent field to generator (#111428)

This commit is contained in:
Joey F. Poon 2021-09-07 15:15:18 -05:00 committed by GitHub
parent 70632e2a9e
commit 14660994d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -82,6 +82,10 @@ export class FleetAgentGenerator extends BaseDataGenerator<Agent> {
action_seq_no: -1,
active: true,
enrolled_at: now,
agent: {
id: this.randomUUID(),
version: this.randomVersion(),
},
local_metadata: {
elastic: {
agent: {

View file

@ -48,6 +48,10 @@ export const indexFleetAgentForHost = async (
): Promise<IndexedFleetAgentResponse> => {
const agentDoc = fleetAgentGenerator.generateEsHit({
_source: {
agent: {
id: endpointHost.agent.id,
version: endpointHost.agent.version,
},
local_metadata: {
elastic: {
agent: {