Back to Skills

fleet-management

Manage a fleet of Grafana Alloy collectors with Fleet Management — author Alloy pipelines once, target them via attribute matchers (`env="production"`, regex `region=~"us-.*"`), push remotely via OpAMP without restarting collectors. Covers pipeline create / update / matcher RPCs, collector attribute API, `remotecfg` bootstrap block (standalone + Helm), pre-deploy `alloy fmt` validation, the local Alloy UI at port 12345 for component health, and post-deploy `REMOTE_CONFIG_STATUS_APPLIED` verifica

199stars17forksUpdated 7/25/2026

Security Assessment

Safe(93/100)
Security Score93/100

About fleet-management

This skill manages a fleet of Grafana Alloy collectors using Grafana Cloud Fleet Management. It solves the problem of centrally authoring and distributing collector configuration: instead of editing config on every host, you write an Alloy (River) pipeline once, target it to collectors by attribute matchers (for example env="production" or a regex on region), and push it remotely over OpAMP so it hot-applies without restarting the collectors.

The skill provides end-to-end workflows built around the Fleet Management gRPC-Web API. It shows authoring a pipeline to a local file, validating it before shipping with `alloy fmt` and `alloy validate`, then creating it via the PipelineService API with attribute matchers, and verifying rollout by listing collectors and confirming each reports REMOTE_CONFIG_STATUS_APPLIED. A troubleshooting workflow surfaces collectors in REMOTE_CONFIG_STATUS_FAILED with their error messages, re-validates the offending pipeline, inspects the local Alloy UI on port 12345 for per-component health, and reads collector logs. An onboarding workflow documents the minimal local `remotecfg` bootstrap block (standalone and Helm), which points at the Fleet Management host with attributes and a poll frequency. API keys are supplied via bearer tokens and environment variables, and the collector attribute API lets matchers target env, team, and region labels.

Target users are platform and observability engineers operating many Alloy collectors who need centralized, hot-applied configuration, safe pre-deploy validation, and rollout verification across a large fleet. The operations are legitimate infrastructure administration using official Grafana tooling and standard token-based authentication.

FAQ

What are the prerequisites?

A Grafana Cloud stack with Fleet Management enabled, an API token with Fleet Management access, Alloy 1.0 or newer on the targets (standalone or via the grafana/alloy Helm chart), and the alloy CLI locally for syntax validation.

How does config reach the collectors?

Pipelines are pushed remotely over OpAMP and hot-applied without restarting collectors. Each target polls Fleet Management (a remotecfg bootstrap block sets the poll frequency) and reports its config status back.

How do I know a rollout succeeded?

List collectors via the CollectorService API and confirm each targeted row reports remoteConfigStatus == REMOTE_CONFIG_STATUS_APPLIED. Failed collectors show REMOTE_CONFIG_STATUS_FAILED with an error message you can decode.

How is configuration validated before deployment?

Locally with alloy fmt (formats/catches typos with line numbers) and alloy validate (full semantic check on newer releases) before the pipeline is created via the API.

How are collectors targeted?

By attribute matchers on key/value labels such as env, team, and region, using equality or regex, with attributes set via the collector API or auto-populated on registration (platform, arch, alloy_version).

All Files

3 files
SKILL.md5.2 KB
View
references/api.md6.2 KB
View
references/bootstrap.md1.2 KB
View

Install fleet-management

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

grafana/skills