-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Elastic Agent] Use Fleet agent ID as agent.id #26394
[Elastic Agent] Use Fleet agent ID as agent.id #26394
Conversation
Pinging @elastic/agent (Team:Agent) |
82bd481
to
d6a4976
Compare
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
This updates the inject_agent_info rule to set the `agent.id` field to the value of the Fleet Agent ID. Previously this value was only added to the `elastic_agent.id` field, and the `agent.id` field was a random UUID generated the first time a Beat process was run. And each Beat process would have its own UUID. This change affects metricbeat, filebeat, heartbeat, osquerybeat, and packetbeat (these are the Beats that have an integration with Agent today). Heartbeat's Agent spec was missing the `inject_agent_info` so I added it. Closes elastic#21121
d6a4976
to
313cd53
Compare
@michalpristas Can you take a look at this PR, I think the strategy but I think you have a better understanding of the impact of changes in the area of the code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the change is backward compatible and preserves elastic_agent.id|version|snapshot
having same ID should be ok as the way of collecting event is an implementation detail.
This updates the inject_agent_info rule to set the `agent.id` field to the value of the Fleet Agent ID. Previously this value was only added to the `elastic_agent.id` field, and the `agent.id` field was a random UUID generated the first time a Beat process was run. And each Beat process would have its own UUID. This change affects metricbeat, filebeat, heartbeat, osquerybeat, and packetbeat (these are the Beats that have an integration with Agent today). Heartbeat's Agent spec was missing the `inject_agent_info` so I added it. Closes #21121 (cherry picked from commit bb950bf)
This updates the inject_agent_info rule to set the `agent.id` field to the value of the Fleet Agent ID. Previously this value was only added to the `elastic_agent.id` field, and the `agent.id` field was a random UUID generated the first time a Beat process was run. And each Beat process would have its own UUID. This change affects metricbeat, filebeat, heartbeat, osquerybeat, and packetbeat (these are the Beats that have an integration with Agent today). Heartbeat's Agent spec was missing the `inject_agent_info` so I added it. Closes #21121 (cherry picked from commit bb950bf) Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
This is a follow up to elastic#26394 which set the agent.id field to the Fleet agent ID for for integrations that are run by Agent, but that didn't cover the Filebeat and Metricbeat processes that are executed by Agent for monitoring itself. This covers those processes. Relates elastic#26394
This is a follow up to #26394 which set the agent.id field to the Fleet agent ID for for integrations that are run by Agent, but that didn't cover the Filebeat and Metricbeat processes that are executed by Agent for monitoring itself. This covers those processes. Relates #26394 (cherry picked from commit 7b66597)
…26591) * Add Fleet agent.id to Agent monitoring data (#26548) This is a follow up to #26394 which set the agent.id field to the Fleet agent ID for for integrations that are run by Agent, but that didn't cover the Filebeat and Metricbeat processes that are executed by Agent for monitoring itself. This covers those processes. Relates #26394 (cherry picked from commit 7b66597) * Fix changelog merge Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
This is a follow up to #26394 which set the agent.id field to the Fleet agent ID for for integrations that are run by Agent, but that didn't cover the Filebeat and Metricbeat processes that are executed by Agent for monitoring itself. This covers those processes. Relates #26394 (cherry picked from commit 7b66597)
What does this PR do?
This updates the inject_agent_info rule to set the
agent.id
field to the value of the Fleet Agent ID.Previously this value was only added to the
elastic_agent.id
field, and theagent.id
field wasa random UUID generated the first time a Beat process was run. And each Beat process would
have its own UUID.
This change affects metricbeat, filebeat, heartbeat, osquerybeat, and packetbeat (these are the
Beats that have an integration with Agent today). Heartbeat's Agent spec was missing the
inject_agent_info
so I added it.Closes #21121
Why is it important?
The
agent.id
of the running processes to match what we show to users in the Fleet UI.Checklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues