-
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
Add Fleet agent.id to Agent monitoring data #26548
Add Fleet agent.id to Agent monitoring data #26548
Conversation
Pinging @elastic/agent (Team:Agent) |
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
cc106e7
to
3023c56
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 pull request is now in conflicts. Could you fix it? 🙏
|
This pull request is now in conflicts. Could you fix it? 🙏
|
"add_fields": map[string]interface{}{ | ||
"target": "agent", | ||
"fields": map[string]interface{}{ | ||
"id": o.agentInfo.AgentID(), |
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.
out of curiosity, why is this processor not part of the input processors above?
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.
It could go there, but by putting here it should be automatically applied to every input. In effect the processor is appended to the list of each input's processors. This way just means less code duplication.
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.
Apparently in the config transformation the root processors
is dropped or not carried over to the final config so that didn't work. I opened #26776 to move add_fields into each input.
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>
* master: (25 commits) fix: Force PLATFORMS environment variable when we build Elastic Agent dependencies on arm64 (elastic#26415) macos for metricbeat to run in the extended meta-stage (elastic#26573) Packaging: add arm7 platform in the main pipeline (elastic#26575) [Heartbeat] Skip flakey timer queue test (elastic#26592) Update to "read_pipeline" permission (elastic#26465) (elastic#26580) API keys do not reflect the need for read_pipeline (elastic#26466) (elastic#26582) Add Fleet agent.id to Agent monitoring data (elastic#26548) Add kinesis metricset (elastic#25989) Refactor of system/memory metricset (elastic#26334) Introduce httpcommon package in libbeat (add support for Proxy) (elastic#25219) [Filebeat] change multiline configuration in awss3 input to parsers (elastic#25873) docs: Hint for the error "Error extracting container id" (elastic#25824) [Docs] Fixed metricbeat redis exported field CPU descriptions (elastic#25846) (elastic#26496) Update urllib to 1.26.5. (elastic#26380) Update golang.org/x/crypto (elastic#26448) [Filebeat] Update Fortinet Ingest Pipeline (elastic#24816) Move parsers outside of filestream input so others can use them as well (elastic#26541) [Filebeat] Fix `threatintel.indicator.url.full` field not populating (elastic#26508) [Filebeat] Add network direction processor to Zeek and Suricata modules (elastic#24620) Logging code cleanup related to Nomad auto-discovery (elastic#26498) ...
An earlier commit elastic#26548 set the same value using a single global processor, but that doesn't seem to make it into the final config so it had no effect. So this sets the agent.id at the same places where elastic_agent.id is added.
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)
…26776) (#26849) An earlier commit #26548 set the same value using a single global processor, but that doesn't seem to make it into the final config so it had no effect. So this sets the agent.id at the same places where elastic_agent.id is added. (cherry picked from commit aa62bba) Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
…26776) (#26850) An earlier commit #26548 set the same value using a single global processor, but that doesn't seem to make it into the final config so it had no effect. So this sets the agent.id at the same places where elastic_agent.id is added. (cherry picked from commit aa62bba) Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
What does this PR do?
This is a follow up to #26394 which set the
agent.id
field to the Fleet agent ID forfor 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
Why is it important?
The agent.id of the running processes should match what we show to users in the Fleet UI.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues