Network Performance Monitoring is now generally available! Network Monitoring is now available!


Agent Check Agent Check

Supported OS: Linux Mac OS Windows


Capture metrics from directories and files of your choosing. The Agent collects:

  • Number of files
  • File size
  • Age of the last modification
  • Age of the creation



The Directory check is included in the Datadog Agent package, so you don’t need to install anything else on your server.


  1. Edit the directory.d/conf.yaml file, in the conf.d/ folder at the root of your Agent’s configuration directory to start collecting Directory performance data. See the sample directory.d/conf.yaml for all available configuration options.

        - directory: "/path/to/directory" # the only required option
          name: "my_monitored_dir"        # What the Agent will tag this directory's metrics with. Defaults to "directory"
          pattern: "*.log"                # defaults to "*" (all files)
          recursive: True                 # default False
          countonly: False                # set to True to only collect the number of files matching 'pattern'. Useful for very large directories.
          ignore_missing: False           # set to True to not raise exceptions on missing or inaccessible directories

    Ensure that the user running the Agent process (usually datadog-agent) has read access to the directories, subdirectories, and files you configure.

    Note: On Windows when you add your directory, use double-backslashes C:\\path\\to\\directory instead of single-backslashes C:\path\to\directory for the check to run. Otherwise, the directory check fails with traceback ending in the error: found unknown escape character in "<string>".

  2. Restart the Agent.

Metrics collection

The Directory check can potentially emit custom metrics, which may impact your billing.


Run the Agent’s status subcommand and look for directory under the Checks section.

Data Collected

Total size of the file
Shown as byte
Duration since last modification
Shown as second
Duration since creation
Shown as second
Number of files in the directory
Shown as file
Total size of the directory
Shown as byte


The Directory check does not include any events.

Service Checks

The Directory check does not include any service checks.


Need help? Contact Datadog support.