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

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# 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. You can also apply configuration updates through the Fleet Automation API. For the Agent settings you can manage with Fleet Automation, see [Supported datadog.yaml Configuration Fields](https://docs.datadoghq.com/agent/fleet_automation/supported_datadog_yaml_fields.md).

You can configure:

- Agents running on hosts
- (In Preview) Agents running in Kubernetes clusters managed by the Datadog Operator

## Configure host-based Agents{% #configure-host-based-agents %}

### Prerequisites{% #prerequisites %}

- [Remote Configuration](https://docs.datadoghq.com/agent/guide/setup_remote_config.md) enabled for your organization and the Agent's API key
- [Remote updates](https://docs.datadoghq.com/agent/guide/setup_remote_config.md#enable-remote-agent-management) enabled on each target VM Agent (`remote_updates: true`)
- Agent version 7.73+ for Agent and OTel Collector configuration (version 7.76+ for configuring integrations and secrets). To upgrade your Agents, see [Upgrade Agents](https://docs.datadoghq.com/agent/fleet_automation/upgrade_agents.md).
- Linux VMs installed with the install script or Ansible Datadog Role, or Windows VMs

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com

{% callout %}
##### Join the Preview!

Managing Datadog Agent tags with Fleet Automation is in Preview. If you're interested in this feature, complete the form to request access.

[Request Access](https://www.datadoghq.com/product-preview/modify-tags-fleet-automation/)
{% /callout %}

{% /callout %}

### 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 the Agent on Kubernetes{% #configure-the-agent-on-kubernetes %}

{% callout %}
# Important note for users on the following Datadog sites: app.datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, app.datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com

{% callout %}
##### Join the Preview!

Configuring Kubernetes Agents with the Datadog Operator in Fleet Automation is in Preview. If you're interested in this feature, complete the form to request access.

[Request Access](https://www.datadoghq.com/product-preview/configure-agent-kubernetes-operator/)
{% /callout %}

{% /callout %}

Use Fleet Automation to edit the `DatadogAgent` custom resource for an Operator-managed Kubernetes cluster. For example, you can enable or adjust APM, log collection, and process monitoring without applying an updated manifest to the cluster manually.

### Prerequisites{% #prerequisites-1 %}

- The Datadog Agent is running in the Kubernetes cluster.
- Datadog Operator v1.27 or later manages the Agent deployment.
- Remote Configuration is enabled for the API key used by the Agent.
- The Operator is configured to accept remote updates. For the required Operator settings, API and application keys, and cluster name requirements, see [Prerequisites for Kubernetes view](https://docs.datadoghq.com/agent/fleet_automation/fleet_view.md#prerequisites-for-kubernetes-view).

### Edit the cluster configuration{% #edit-the-cluster-configuration %}

1. Navigate to [Fleet View](https://app.datadoghq.com/fleet).
1. Under View by infra type, switch to the Kubernetes view.
1. Select the cluster that you want to configure, then open the Configuration tab.
1. Click Edit and update the `DatadogAgent` configuration.
1. Review the changes, then click Deploy Changes.

Fleet Automation initiates the change, and Remote Configuration transmits it to the cluster. The Datadog Operator updates the `DatadogAgent` resource and rolls out the configuration across the Agent pods. If the rollout does not complete successfully, the Operator automatically restores the previous configuration.

**Note**: Fleet Automation does not support editing Helm Chart values.

## 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. For the fields you can manage, see [Supported datadog.yaml Configuration Fields](https://docs.datadoghq.com/agent/fleet_automation/supported_datadog_yaml_fields.md).

## 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 %}

Additional helpful documentation, links, and articles:

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