Path: blob/main/docs/sources/static/configuration/agent-management.md
4096 views
---
---
Agent Management - Experimental
Agent Management is under active development. Backwards incompatible changes to its API are to be expected. Feedback is much appreciated. This is a feature that MAY NOT make it production.
Agent Management enables centralized management of fleets of Grafana Agents.
In this mode, Grafana Agent polls and dynamically reloads its configuration from a remote API server.
Remote Configurations are composed of a base configuration and a set of snippets. Snippets are applied conditionally via label matching.
Configuration
Agent Management can be used by passing the flag -enable-features=agent-management
. When enabled, the file referred to -config.file
will be loaded as an agent management configuration file.
Agent Management configuration files are YAML documents which conform the following schema:
API (v2)
Grafana Agents with Agent Management enabled continuously poll the API server for an up-to-date configuration. The API server is expected to implement a GET /agent-management/api/agent/v2/namespace/:namespace/remote_config
HTTP endpoint returning a successful response with the following body format:
grafana_agent_config
This is a standard Grafana Agent static mode configuration. Typically used to configure the server, remote_writes, and other global configuration.
snippet_content
The snippet content is a YAML document which conforms to the following schema:
Note: More information on the following types can be found in their respective documentation pages:
Note: Snippet selection is currently done in the API server. This behaviour is subject to change in the future.