-
Notifications
You must be signed in to change notification settings - Fork 154
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 the full set of ECS metadata sent to Fleet to Diagnostics #7029
base: main
Are you sure you want to change the base?
Add the full set of ECS metadata sent to Fleet to Diagnostics #7029
Conversation
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
This pull request does not have a backport label. Could you fix it @cmacknz? 🙏
|
💔 Build Failed
Failed CI Steps
Historycc @cmacknz |
|
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.
Didn't think about how the host information would not be included in variables by default would affect the information provided in diagnostics.
Overall I am good with this change, but will wait for passing CI before giving approval.
What does this PR do?
Adds the full set of ECS metadata that is sent to Fleet when the agent checks in to diagnostics. If you don't know what that is, it's this:
elastic-agent/internal/pkg/agent/application/gateway/fleet/fleet_gateway.go
Lines 327 to 330 in d2047ac
elastic-agent/internal/pkg/agent/application/info/agent_metadata.go
Lines 25 to 31 in d2047ac
Why is it important?
When all providers were enabled by default, you were able to get the information about the host from the host provider (hostname, OS version, etc) in the variables.yaml file. Now that providers are only enabled when referenced explicitly in the policy, the content of the variables.yaml file is by default:
This makes sure that detailed information about the host is available in diagnostics all the time separately from providers. This is useful if you are say, debugging why you can't find agent by the hostname you think it should have in Fleet. The format of the agent-info.yaml file now looks like:
Disruptive User Impact
I removed some of the duplicated keys from the top level of agent-info.yaml. I am assuming nobody was relying on this in a critical way.
How to test this PR locally
elastic-development-agent diagnostics
and then read the agent-info.yaml file.