Configure Custom Logs

This product is not supported for your selected Datadog site. ().

Use Fleet Automation to manage 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

  • Remote Configuration enabled for your organization
  • Agent version 7.76 or later. To upgrade your Agents, see Upgrade Agents.
  • 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.
Configuring custom logs on Agents in containerized workloads is not supported. For containerized environments, see Kubernetes Log Collection.

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 tab and click Configure Agents.

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

  3. Choose Custom Logs.

  4. 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. Use the Tags field to attach tags 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.
  5. Review the deployment plan. Fleet Automation generates a configuration diff for each affected Agent so you can verify the exact changes.

  6. Click Deploy Configuration to start the deployment. Track progress from the Deployments page.

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

After you deploy a configuration:

  1. In Fleet Automation, open the details page for one of the targeted Agents.
  2. 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.

Further Reading