Skip to content

[Agent] Agent UUID step 1#15144

Merged
michalpristas merged 9 commits intoelastic:fleetfrom
michalpristas:agent-uuid
Dec 19, 2019
Merged

[Agent] Agent UUID step 1#15144
michalpristas merged 9 commits intoelastic:fleetfrom
michalpristas:agent-uuid

Conversation

@michalpristas
Copy link
Copy Markdown
Contributor

First step generates ID as UUID and allows components where agentID is injected to get latest UUID always (by injecting get method instead of value)

@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/ingest (Project:fleet)

Comment thread x-pack/agent/pkg/agent/application/local_mode.go Outdated
Comment thread x-pack/agent/pkg/agent/application/local_mode.go Outdated
Comment thread x-pack/agent/pkg/agent/application/local_mode.go Outdated
Comment thread x-pack/agent/pkg/agent/application/local_mode.go Outdated
// NewCheckinCmd creates a new api command.
func NewCheckinCmd(agentID string, client clienter) *CheckinCmd {
const p = "/api/fleet/agents/%s/checkin"
func NewCheckinCmd(agentID func() string, client clienter) *CheckinCmd {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@michalpristas What if we try to make it more future proof and we have an AgentInfo struct that expose the ID() method, this will effectively limit required changes if we have more internal data to pass around the code?

Comment thread x-pack/agent/pkg/agent/application/agent_info.go
Comment thread x-pack/agent/pkg/agent/application/agent_info.go
@ph
Copy link
Copy Markdown
Contributor

ph commented Dec 17, 2019

We are close a few hounds comments :)

Copy link
Copy Markdown
Contributor

@ph ph left a comment

Choose a reason for hiding this comment

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

LGTM

@michalpristas michalpristas merged commit e25649f into elastic:fleet Dec 19, 2019
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
* uuid for agent id

* fixed hound dog

* pass agent info

* pass agent info

* agent infor comments

* notice update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants