The Check Loader: No Valid Integration Found error means the Datadog Agent is trying to load a DogStatsD check, but it can’t find the necessary configuration files for that specific integration.

Common Causes and Fixes

  1. Missing or Misnamed conf.d Directory:

    • Diagnosis: The Agent expects integration configurations to be in a directory named conf.d within its main configuration folder. If this directory is missing or renamed, the Agent won’t find any integrations.
      • Check for the existence of $DD_AGENT_HOME/conf.d (Linux/macOS) or %PROGRAMDATA%\Datadog\conf.d (Windows).
    • Fix: Ensure the conf.d directory exists. If it’s missing, create it:
      sudo mkdir -p /etc/datadog-agent/conf.d
      
      or on Windows:
      New-Item -ItemType Directory -Path C:\ProgramData\Datadog\conf.d
      
    • Why it works: This directory is the designated root for all custom and bundled integration configurations. Without it, the loader has no place to look.
  2. Incorrect Integration File Naming:

    • Diagnosis: Each integration’s configuration needs to be in a file named <integration_name>.d/<integration_name>.yaml inside the conf.d directory. For example, a PostgreSQL integration would have its configuration in conf.d/postgres.d/postgres.yaml.
      • List the contents of your conf.d directory:
        ls -R /etc/datadog-agent/conf.d
        
        or on Windows:
        Get-ChildItem -Recurse C:\ProgramData\Datadog\conf.d
        
      • Look for files that don’t follow the <name>.d/<name>.yaml pattern.
    • Fix: Rename the directory and the .yaml file to match the integration name. For instance, if you have conf.d/my_postgres.d/config.yaml, rename it to conf.d/postgres.d/postgres.yaml.
      sudo mv /etc/datadog-agent/conf.d/my_postgres.d/config.yaml /etc/datadog-agent/conf.d/postgres.d/postgres.yaml
      
      On Windows, use Rename-Item.
    • Why it works: The Check Loader specifically looks for this hierarchical structure and naming convention to identify and load integrations.
  3. Corrupted or Empty Integration Configuration Files:

    • Diagnosis: The configuration files might exist but be empty or contain syntax errors that prevent them from being parsed.
      • Check the file size:
        ls -lh /etc/datadog-agent/conf.d/<integration_name>.d/<integration_name>.yaml
        
        If the size is 0 bytes, it’s empty.
      • Check file permissions. Ensure the dd-agent user can read the files.
        ls -l /etc/datadog-agent/conf.d/<integration_name>.d/
        
    • Fix: Ensure the .yaml file contains valid YAML syntax and has at least the basic structure. For example, a minimal postgres.yaml might look like:
      init_config:
      
      instances:
        - host: "localhost"
          port: 5432
          username: "datadog"
          password: "your_password"
          dbname: "postgres"
      
      If permissions are wrong, correct them:
      sudo chown -R dd-agent:dd-agent /etc/datadog-agent/conf.d/<integration_name>.d/
      sudo chmod 640 /etc/datadog-agent/conf.d/<integration_name>.d/<integration_name>.yaml
      
    • Why it works: The loader needs to parse the YAML to understand the integration’s parameters. Empty or malformed files prevent this parsing. Correct permissions ensure the Agent process can access the configuration.
  4. Incorrect dogstatsd Configuration:

    • Diagnosis: The error specifically mentions DogStatsD. This means the Agent is trying to process metrics sent via DogStatsD, which relies on specific integration configurations for parsing custom metrics. If the dogstatsd section in datadog.yaml is misconfigured or pointing to non-existent integrations, this error can occur.
      • Check $DD_AGENT_HOME/etc/datadog.yaml (Linux/macOS) or %PROGRAMDATA%\Datadog\datadog.yaml (Windows) for the dogstatsd section.
    • Fix: Ensure use_dogstatsd: true is set in datadog.yaml and that the integrations configured for DogStatsD (dogstatsd_mapper_profiles, dogstatsd_non_local_traffic) have corresponding files in conf.d. If you’re not actively using DogStatsD for custom metrics, you can disable it:
      # In datadog.yaml
      dogstatsd:
        use_dogstatsd: false
      
      If you are using it, ensure the paths to mapper profiles are correct and the files exist.
    • Why it works: This setting directly controls whether the Agent attempts to parse and process DogStatsD traffic. If enabled, it expects the necessary integration configurations to be present.
  5. Agent Version Mismatch or Corrupted Installation:

    • Diagnosis: In rare cases, a corrupted Agent installation or an issue with the Agent’s internal checks loader mechanism can cause this.
      • Check the Agent version:
        datadog-agent version
        
      • Review Agent logs for other errors around startup or during the time the DogStatsD check would typically load. Logs are usually at /var/log/datadog/agent.log (Linux) or %PROGRAMDATA%\Datadog\logs\agent.log (Windows).
    • Fix: Reinstall the Datadog Agent. This ensures all core files and directories are correctly set up.
      # Example for Debian/Ubuntu
      sudo apt-get update
      sudo apt-get --reinstall install datadog-agent
      
    • Why it works: A clean installation guarantees that the Agent’s core components, including the check loading mechanism and default directories, are in their expected state.
  6. Overlapping or Duplicate Integration Names:

    • Diagnosis: If you have multiple integrations with the same name (e.g., two different redis.d directories or files), the loader can get confused.
      • Run ls -R /etc/datadog-agent/conf.d | grep '\.d$' to list all directories ending in .d and check for duplicates.
    • Fix: Consolidate or rename duplicate integration configurations to ensure each integration name is unique.
      # Example: if you have both conf.d/redis.d/redis.yaml and conf.d/myredis.d/redis.yaml
      # and they are meant to be the same integration, consolidate them into one.
      sudo mv /etc/datadog-agent/conf.d/myredis.d/redis.yaml /etc/datadog-agent/conf.d/redis.d/
      sudo rm -rf /etc/datadog-agent/conf.d/myredis.d
      
    • Why it works: The Check Loader uses a dictionary-like structure to store loaded integrations. Duplicate keys (integration names) can lead to unexpected behavior or errors as the loader tries to resolve which configuration to use.

After fixing these, restart the Datadog Agent:

sudo systemctl restart datadog-agent

or on Windows:

Restart-Service datadogagent

The next error you’re likely to encounter if any custom metrics are still malformed or unparseable is a DogStatsD: Invalid metric format or a specific integration check failing with a configuration error.

Want structured learning?

Take the full Datadog course →