Supported OS Linux Mac OS Windows

インテグレーションバージョン2.1.1

概要

選択したディレクトリやファイルからメトリクスをキャプチャします。Agent は以下を収集します。

  • ファイルの数
  • ファイルサイズ
  • 最終更新からの経過時間
  • 作成からの経過時間

計画と使用

インフラストラクチャーリスト

Directory チェックは Datadog Agent パッケージに含まれています。サーバーに追加でインストールする必要はありません。

ブラウザトラブルシューティング

  1. Directory のパフォーマンスデータの収集を開始するには、Agent のコンフィギュレーションディレクトリのルートにある conf.d/ フォルダーの directory.d/conf.yaml ファイルを編集します。使用可能なすべてのコンフィギュレーションオプションについては、サンプル directory.d/conf.yaml を参照してください。

    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>"
    

    Agent プロセスを実行しているユーザーが (通常は datadog-agent)、構成したディレクトリ、サブディレクトリ、およびファイルへの読み取りアクセス権を持つことを確認してください。

    : Windows でチェックを実行するには、ディレクトリを追加する際に、単一のバックスラッシュ C:\path\to\directory ではなく、ダブルバックスラッシュ C:\\path\\to\\directory を使用してください。そうしないと、トレースバックの最後に found unknown escape character in "<string>" というエラーが示されて、ディレクトリチェックが失敗します。

  2. Agent を再起動します

検証

Agent の status サブコマンドを実行し、Checks セクションで directory を探します。

リアルユーザーモニタリング

データセキュリティ

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

ヘルプ

Directory チェックには、イベントは含まれません。

ヘルプ

system.disk.directory.exists
Returns WARNING if the Agent is unable to find or access the directory to monitor, OK otherwise.
Statuses: ok, warning

ヘルプ

非常に大きなディレクトリに対してチェックを実行し、再帰が true に設定されている場合、I/O と CPU に負荷がかかることに注意してください。デフォルトのチェック頻度である 15 秒ごとを調整する必要があるかもしれません。

例えば、15,000 個のファイルとサブディレクトリがあるディレクトリで、CPU 使用率の高いチェックが 30〜40 秒実行される場合、チェック頻度を低くセットアップしなければ、CPU 使用率の高いチェックが効率よく継続的に実行されます。

ご不明な点は、Datadog のサポートチームまでお問合せください。