---
title: Configure Agents
description: >-
  Roll out and manage Datadog Agent configuration at scale with Fleet
  Automation.
breadcrumbs: Docs > Agent > Fleet Automation > Configure Agents
---

# Configure Agents

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

Use [Fleet Automation](https://app.datadoghq.com/fleet) to roll out and manage Datadog Agent configuration at scale. Apply configuration changes through guided workflows in the UI or with custom YAML files.

## Prerequisites{% #prerequisites %}

- [Remote Configuration](https://docs.datadoghq.com/agent/guide/setup_remote_config.md) enabled for your organization
- Agent version 7.73+ for Agent and OTel Collector configuration (version 7.76+ for configuring integrations and secrets)
- Linux VMs installed with the install script or Ansible Datadog Role, or Windows VMs

{% alert level="info" %}
Remote configuration of Agents in containerized workloads is not supported.
{% /alert %}

## Configure multiple Agents{% #configure-multiple-agents %}

1. In Fleet Automation, open the [Configuration](https://app.datadoghq.com/fleet/agent-management) tab and click Configure Agents.

1. Scope the configuration to the target Agents. Filter by host information or tags to target a specific group.

   {% image
      source="https://docs.dd-static.net/images/agent/fleet_automation/fa_scope_config.19ca310f1ae6fb8a9cadd3939bef88b5.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/agent/fleet_automation/fa_scope_config.19ca310f1ae6fb8a9cadd3939bef88b5.png?auto=format&fit=max&w=850&dpr=2 2x"
      alt="The Scope this configuration step in Fleet Automation's Configure Agents workflow, showing filters for environment, operating system, and hostname, a list of 33 Agents included in scope, and a Configuration Summary panel on the right." /%}

1. Select the products (for example, Logs, APM, or NDM) that the target Agents should run.

   {% image
      source="https://docs.dd-static.net/images/agent/fleet_automation/fa_create_agent_configuration3.0038cfbddb2710eb16cfa7827970faef.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/agent/fleet_automation/fa_create_agent_configuration3.0038cfbddb2710eb16cfa7827970faef.png?auto=format&fit=max&w=850&dpr=2 2x"
      alt="The Select products to configure step in Fleet Automation's Configure Agents workflow, showing product tiles grouped under Core Observability (Infrastructure Monitoring, Log Management, APM) and Additional Observability (Live Process Monitoring, Cloud Network Monitoring, Network Device Monitoring)." /%}

1. Review the deployment plan to confirm scoped Agents and deployment settings, such as rollout concurrency.

1. Click Deploy Configuration to start the deployment and track its progress from the [Deployments page](https://app.datadoghq.com/fleet/deployments).

## Edit the configuration of a single Agent{% #edit-the-configuration-of-a-single-agent %}

1. Navigate to [Fleet View](https://app.datadoghq.com/fleet).

1. (Optional) Filter by host information or tags to narrow the list.

1. Select a host to open its side panel, then click the Configuration tab.

1. Click Edit to modify the configuration.

1. Click Deploy Changes to apply your updates.

**Note**: Some configuration fields (for example, `api_key`, `site`, and `notable_events`) cannot be modified.

The example below shows the `logs_enabled` field changed from `false` to `true`, which enables log collection on the Agent after deployment.

{% image
   source="https://docs.dd-static.net/images/agent/fleet_automation/agent_remote_management_single_agent_config2.a5ae38b1cf5ddc54eb4b1e5cffbc6511.png?auto=format&fit=max&w=850 1x, https://docs.dd-static.net/images/agent/fleet_automation/agent_remote_management_single_agent_config2.a5ae38b1cf5ddc54eb4b1e5cffbc6511.png?auto=format&fit=max&w=850&dpr=2 2x"
   alt="Edit and deploy Agent configuration changes." /%}

## Configure Agents with the API{% #configure-agents-with-the-api %}

Fleet Automation provides an API to apply configuration updates programmatically. Deploy changes to any group of hosts with filter queries, supplying either full configuration files or targeted patches. Push configuration on demand or integrate it into your existing automation workflows. For full details, see the [Fleet Automation API](https://docs.datadoghq.com/api/latest/fleet-automation.md).

**Note**: The API does not support all Agent configuration fields. Settings related to Agent connection or secrets (`site`, `api_key`, and other authentication parameters) cannot be managed through the API.

## Configuration precedence{% #configuration-precedence %}

Configuration changes deployed through Fleet Automation follow different rules depending on the target:

- **Agent configuration (`datadog.yaml`):** Fleet Automation applies changes using merge patch: only the specified fields are updated, and unmentioned fields are left unchanged. If a conflict occurs at the field level, the Fleet Automation value takes precedence over any local value.

- **Integration and custom log configurations:** Fleet Automation supports two modes:

  - Deploy a new configuration file.
  - Update an existing file using merge patch to modify only specific fields. If you deploy a change targeting an existing filename without using merge patch, the file is fully overwritten.

In both cases, the most recent change becomes the Agent's active configuration, regardless of the source (Fleet Automation, configuration management tools, or direct host edits).

Use [Fleet Automation Audit Trail](https://docs.datadoghq.com/agent/fleet_automation/fleet_view.md#view-agent-audit-trail-events) to track recent configuration changes to your Agents and set up alerts on those changes.

## Mirrors and proxies{% #mirrors-and-proxies %}

You can use remote Agent management along with a proxy or mirrored repositories.

For instructions on configuring your Agent to use a proxy, see [Agent Proxy Configuration](https://docs.datadoghq.com/agent/configuration/proxy.md). After you've configured the proxy, restart the Agent to apply the settings.

For instructions on using mirrored or air-gapped repositories, see:

- [Synchronize Datadog's images with a private container registry](https://docs.datadoghq.com/containers/guide/sync_container_images.md)
- [Installing the Agent on a server with limited internet connectivity](https://docs.datadoghq.com/agent/guide/installing-the-agent-on-a-server-with-limited-internet-connectivity.md)

## Further Reading{% #further-reading %}

- [Fleet Automation](https://docs.datadoghq.com/agent/fleet_automation.md)
- [Fleet Automation API](https://docs.datadoghq.com/api/latest/fleet-automation.md)
