Directory
Datadog の調査レポート: サーバーレスの状態 レポート: サーバーレスの状態

Directory

Agent Check Agentチェック

Supported OS: Linux Mac OS Windows

このページは日本語には対応しておりません。随時翻訳に取り組んでいます。翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください。

Overview

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

Setup

Installation

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

Configuration

  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.

    init_config:
    
    instances:
     ## @param directory - string - required
     ## The directory to monitor. On windows, please make sure you escape back-slashes otherwise the YAML
     ## parser fails (eg. - directory: "C:\\Users\\foo\\Downloads").
     #
     - directory: "<DIRECTORY_PATH>"

    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.

Validation

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

Data Collected

Metrics

system.disk.directory.file.bytes
(gauge)
Total size of the file
Shown as byte
system.disk.directory.file.modified_sec_ago
(gauge)
Duration since last modification
Shown as second
system.disk.directory.file.created_sec_ago
(gauge)
Duration since creation
Shown as second
system.disk.directory.files
(gauge)
Number of files in the directory
Shown as file
system.disk.directory.bytes
(gauge)
Total size of the directory
Shown as byte

Events

The Directory check does not include any events.

Service Checks

The Directory check does not include any service checks.

Troubleshooting

Need help? Contact Datadog support.