Skip to content

[APM] Inject agent config directly into APM Fleet policies #95501

@axw

Description

@axw

As part of the move to Fleet we will need to move away from fetching agent config directly from Kibana, as the privileges APM Server is given do not cover this. Instead, agent config will be pushed down to APM Server via the server's policy.

When agent config is created/updated/removed in Kibana, APM Fleet policies should be updated to include the new agent config directly. For each config block, Kibana will need to supply: the criteria (service name and/or service environment), settings, and an Etag value.

As APM Server will not be communicating directly with Kibana, we will have to come up with a new way of identifying that config has been applied. I can think of two main options, as described in elastic/apm-server#5018:

  1. APM Server will index a document whenever a config block is first known to have been applied to an agent. This is similar to what we do today.
  2. Agents will periodically send an event to APM Server including agent statistics and the currently applied config Etag, and this will be indexed by the server. This would have the benefit of enabling us to see how many and which agents have applied the config.

Proposed user flow:

  1. When superuser visits agent configuration settings, get the list of agent policies -> check each for the apm integration package policy
  2. If an APM fleet integration exists, then display a checkbox in agent configuration settings to synchronize settings with fleet management
  3. When checked, agent configs will be copied to policy and can only be modified by the super user (other users will see a ready-only page)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions