Skip to content

Commit

Permalink
[Security Solution] add agent field to generator (#111428) (#111460)
Browse files Browse the repository at this point in the history
Co-authored-by: Joey F. Poon <joey.poon@elastic.co>
  • Loading branch information
kibanamachine and joeypoon authored Sep 7, 2021
1 parent 48b25a6 commit d4d52b0
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 d4d52b0

Please sign in to comment.