/datadog-max-file-age-check

Custom datadog agent check to check for files that are older than a specified time.

Primary LanguagePythonApache License 2.0Apache-2.0

datadog-max-file-age-check

Check directories do not contain files that are older than x

This check will report a gauge that contains the amount of files that are older than the specified max age

Usage

Copy the python file to checks.d/max_file_age_check.py then copy the yaml file to conf.d/max_file_age_check.yaml

Note: The name of the python file AND the yaml file MUST be the same

Configuration file

instances:
  - path: "C:\\PathToMyFolder\\" # Path to folder
    max_age: 2 # Max age in minutes
    metric_name: custom.image_folder_expired_files # Name of metric in datadog
  - path: "C:\\PathToMySecondFolder\\"
    max_age: 2
    metric_name: custom.image_folder_two_expired_files