---
title: Use the Datadog Agent for Log Collection Only
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Log Management > Logs Guides > Use the Datadog Agent for Log Collection
  Only
---

# Use the Datadog Agent for Log Collection Only

{% alert level="warning" %}
Infrastructure Monitoring is a prerequisite to using APM. If you are an APM customer, do not turn off metric collection or you might lose critical telemetry and metric collection information.
{% /alert %}

To disable payloads, you must be running Agent v6.4+. This disables metric data submission (including Custom Metrics) so that hosts stop showing up in Datadog. Follow these steps:

{% tab title="Host " %}

1. Open the [datadog.yaml configuration file](https://docs.datadoghq.com/agent/configuration/agent-configuration-files/).

1. Add the `enable_payloads` as a top-level attribute anywhere in the configuration file with the following settings:

   ```yaml
   enable_payloads:
       series: false
       events: false
       service_checks: false
       sketches: false
   ```

1. [Configure the Agent to collect Logs](https://docs.datadoghq.com/logs/log_collection/).

1. [Restart the Agent](https://docs.datadoghq.com/agent/configuration/agent-commands/#restart-the-agent).

{% /tab %}

{% tab title="Docker" %}
If you're using the Docker containerized Agent, set the following environment variables to `false`:

- `DD_ENABLE_PAYLOADS_EVENTS`
- `DD_ENABLE_PAYLOADS_SERIES`
- `DD_ENABLE_PAYLOADS_SERVICE_CHECKS`
- `DD_ENABLE_PAYLOADS_SKETCHES`

Here's an example of how you can include these settings in your Docker run command:

```shell
docker run -d --name datadog-agent \
           --cgroupns host \
           --pid host \
           -e DD_API_KEY=<DATADOG_API_KEY> \
           -e DD_LOGS_ENABLED=true \
           -e DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true \
           -e DD_CONTAINER_EXCLUDE="name:datadog-agent" \
           -e DD_ENABLE_PAYLOADS_EVENTS=false \
           -e DD_ENABLE_PAYLOADS_SERIES=false \
           -e DD_ENABLE_PAYLOADS_SERVICE_CHECKS=false \
           -e DD_ENABLE_PAYLOADS_SKETCHES=false \
           -e DD_PROCESS_AGENT_ENABLED=false \
           -e DD_PROCESS_CONFIG_CONTAINER_COLLECTION_ENABLED=false \
           -v /var/run/docker.sock:/var/run/docker.sock:ro \
           -v /proc/:/host/proc/:ro \
           -v /opt/datadog-agent/run:/opt/datadog-agent/run:rw \
           -v /sys/fs/cgroup/:/host/sys/fs/cgroup:ro \
           registry.datadoghq.com/agent:latest
```

{% /tab %}

{% tab title="Kubernetes" %}
If you're deploying the Agent in Kubernetes, make the following changes in your Helm chart in addition to your Agent configuration:

```yaml
 ## Send logs only
clusterAgent:
  enabled: false
datadog:
[...]
  processAgent:
    enabled: false
    containerCollection: false
[...]
  env:
    - name: DD_ENABLE_PAYLOADS_EVENTS
      value: "false"
    - name: DD_ENABLE_PAYLOADS_SERIES
      value: "false"
    - name: DD_ENABLE_PAYLOADS_SERVICE_CHECKS
      value: "false"
    - name: DD_ENABLE_PAYLOADS_SKETCHES
      value: "false"
```

{% /tab %}

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

- [Docker Log Collection](https://docs.datadoghq.com/containers/docker/log/?tab=containerinstallation)
- [Kubernetes Log Collection](https://docs.datadoghq.com/containers/kubernetes/log/)
