Skip to content

Report whether an agent is Fleet managed or standalone or unprivileged to components #4683

@cmacknz

Description

@cmacknz

Allow components (specifically Beats sub-processes) to determine if they are connected to a standalone or a Fleet managed agent so that they can add this information to the User-Agent string. Additionally include whether the agent is unprivileged since it is cheap to add as part of this change.

Determining the privilege level is a single function call, for example see

Unprivileged: agentInfo.Unprivileged(),

Adding this information to the AgentInfo message in the control protocol is likely the best choice. https://github.com/elastic/elastic-agent-client/blob/ac72c3488d26b2b319cec87536d45eea35b81d17/elastic-agent-client.proto#L197-L210

// Agent information that the component might want to use for its events,
// including the package version, which components should report instead
// of their own version.
//
// Sent on component start up as part of StartUpInfo and on the first checkin
// expected response to the component.
message AgentInfo {
    // ID is the Elastic Agent's unique ID.
    string id = 1;
    // Version is the package version of the running Elastic Agent.
    string version = 2;
    // Snapshot is true when the running Elastic Agent is a snapshot version.
    bool snapshot = 3;
}

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions