---
title: Configure Custom Logs
description: Remotely configure custom log collection at scale with Fleet Automation.
breadcrumbs: Docs > Agent > Fleet Automation > Configure Custom Logs
---

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

# Configure Custom Logs

{% 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/agent-management) to manage [custom log collection](https://docs.datadoghq.com/agent/logs.md?tab=tailfiles#custom-log-collection) settings on your Agents remotely at scale. Instead of editing `conf.d` configuration files host by host, scope a change by host information or tag and deploy it to all matching Agents at once. Before deploying, review the configuration diff for each Agent in scope.

## Prerequisites{% #prerequisites %}

- [Remote Configuration](https://docs.datadoghq.com/agent/guide/setup_remote_config.md) enabled for your organization
- Agent version 7.76 or later. 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 the Ansible Datadog Role) or Windows VMs
- Log collection enabled on the target Agents (`logs_enabled: true` in `datadog.yaml`). Fleet Automation deploys the configuration file either way, but the Agent does not start collecting logs until log collection is enabled. See [Host Agent Log Collection](https://docs.datadoghq.com/agent/logs.md).

{% alert level="info" %}
Configuring custom logs on Agents in containerized workloads is not supported. For containerized environments, see [Kubernetes Log Collection](https://docs.datadoghq.com/containers/kubernetes/log.md).
{% /alert %}

## Configure custom logs across multiple Agents{% #configure-custom-logs-across-multiple-agents %}
As you step through the configuration wizard, the **Configuration Summary** panel shows your current selected scope of Agents. Use this to check how a change would affect an Agent by previewing configuration diffs on a specific Agent in scope.
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.

1. Choose Custom Logs.

1. Select an operation (for more information, see How configuration changes are applied):

   - Add New. Specify the filename for the new configuration file, and fill in the configuration as prompted. For an explanation of the log collection fields, see [Custom log collection](https://docs.datadoghq.com/agent/logs.md?tab=tailfiles#custom-log-collection). Use the Tags field to attach [tags](https://docs.datadoghq.com/getting_started/tagging/assigning_tags.md) to the collected logs. Click + Add Log Collection to add more log collection settings.
   - Edit & Replace. Click Select a File and choose the configuration file you want to replace, then update the log collection settings.
   - Delete. Click Select a File to Delete.
Toggle between **Visual** and **YAML** mode when filling out the log collection configuration. Use **YAML** mode to paste in YAML directly.
1. Review the deployment plan. Fleet Automation generates a configuration diff for each affected Agent so you can verify the exact changes.

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

## How configuration changes are applied{% #how-configuration-changes-are-applied %}

Each operation applies changes to custom log collection on an Agent differently:

- Add New: Deploys a new configuration file.

- Edit & Replace: Replaces the entire configuration file. Include all desired values in your update. Any values you omit are removed.

- Delete: Removes the configuration file from the target Agents.

## Verify log collection{% #verify-log-collection %}

After you deploy a configuration:

1. In [Fleet Automation](https://app.datadoghq.com/fleet), open the details page for one of the targeted Agents.
1. In the Configuration tab, confirm that the new or updated custom log configuration file is listed with no error status. This means the configuration was pushed and applied successfully.

If the deployment succeeded but no logs arrive, see the [Log Collection Troubleshooting Guide](https://docs.datadoghq.com/logs/guide/log-collection-troubleshooting-guide.md).

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

- [Fleet Automation](https://docs.datadoghq.com/agent/fleet_automation.md)
- [Configure Agent Integrations](https://docs.datadoghq.com/agent/fleet_automation/configure_integrations.md)
- [Configure Agents](https://docs.datadoghq.com/agent/fleet_automation/configure_agents.md)
- [Fleet Automation API](https://docs.datadoghq.com/api/latest/fleet-automation.md)
- [Host Agent Log Collection](https://docs.datadoghq.com/agent/logs.md)
- [Log Collection Troubleshooting Guide](https://docs.datadoghq.com/logs/guide/log-collection-troubleshooting-guide.md)
