fleet-automation

Manage Datadog Agent fleets through discovery, configuration deployments, package upgrades, and scheduled maintenance windows.

5|2|Updated Mar 9, 2026
One-click install
npx skills add https://github.com/lauhon/pi --skill fleet-automation-lauhon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fleet-automation
Source: https://github.com/lauhon/pi/tree/main/skills/fleet-automation
Command: npx skills add https://github.com/lauhon/pi --skill fleet-automation-lauhon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing Datadog Agents across a large infrastructure manually is slow and error-prone. This Skill lets you discover agents, push configuration changes, upgrade agent packages, and automate recurring upgrades through the Datadog Fleet Automation API using the pup CLI. ## Core Features & Use Cases - Agent Discovery: List and filter all Datadog Agents by tags, hostname, or query syntax, and inspect per-agent integrations, configuration layers, and remote management status. - Deployments at Scale: Create configuration deployments (merge-patch or delete operations) and package upgrade deployments targeting hosts selected with Datadog query syntax, with per-host progress tracking and cancellation. - Scheduled Upgrades: Define recurring maintenance windows with day-of-week rules, timezones, and version strategies (latest, N-1, N-2) to automate agent upgrades. - Use Case: Upgrade all production web servers to Agent 7.52.0 by running a single filtered package upgrade deployment, then monitor per-host status until completion. ## Quick Start Ask the agent to list all production agents and then create a package upgrade deployment targeting env:prod to the latest available Datadog Agent version.

Frequently Asked Questions about fleet-automation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upgrade Datadog Agents across my entire fleet?

Create a package upgrade deployment with pup fleet deployments create-upgrade, specifying a filter query, package name, and target version. The deployment upgrades all matching hosts and reports per-host status including initial, target, and current versions.

How do I deploy configuration changes to multiple Datadog Agents?

Use pup fleet deployments create-config with a filter query, file path, and file operation. Merge-patch updates specific fields while preserving existing configuration, and delete removes configuration files from targeted hosts.

What permissions does Datadog Fleet Automation require?

Fleet Automation requires DD_API_KEY and DD_APP_KEY environment variables, with the application key holding agent_upgrade_write and fleet_policies_write permissions. Missing permissions produce an error indicating the required scopes.

How do I schedule automatic Datadog Agent upgrades?

Create a schedule with pup fleet schedules create, specifying a target query, days of week, start time, duration in minutes, timezone, and version strategy. Strategy 0 uses the latest version, while 1 or 2 select N-1 or N-2 for conservative rollouts.

Can I cancel a Datadog fleet deployment in progress?

Yes, run pup fleet deployments cancel with the deployment ID to stop active or pending deployments. Completed deployments cannot be cancelled, and the command reports which operations were halted.

Why does my fleet deployment fail on some hosts?

Per-host failures commonly stem from permission errors on config files, agent versions too old for the change, full disks, unresponsive agents, or disabled remote configuration. Check deployment details for per-host error messages and retry after fixing the underlying issues.