Skip to content

Commit

Permalink
[Security Solution] add agent field to generator (elastic#111428)
Browse files Browse the repository at this point in the history
  • Loading branch information
joeypoon authored and chrisronline committed Sep 8, 2021
1 parent 856c8d3 commit 26db467
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 26db467

Please sign in to comment.