Storage

Description

Collect storage information on a directory.

Parameters

ParameterDescriptionTypeDefault
pathAbsolute path to the directory to inspect, expect environment variablesstrN/A (Mandatory)

Schema

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Storage",
    "description": "Storage information of a directory",
    "properties": {
        "free_percent": {
            "description": "Free space on the filesystem, in percent",
            "type": "number",
            "minimum": 0
        },
        "free": {
            "description": "Free space on the filesystem, in bytes",
            "type": "integer",
            "minimum": 0
        },
        "capacity": {
            "description": "Total size of the filesystem, in bytes",
            "type": "integer",
            "minimum": 0
        }
    },
    "type": "object"
}

Configuration

...
storage_home:
  plugin: "dc_measurements/Storage"
  topic_output: "/dc/measurement/storage_home"
  path: "$HOME"

Example output

{
  "capacity": 460041527296,
  "flattened": false,
  "free": 74388291584,
  "free_percent": 11.073844909667969,
  "name": "storage_home",
  "nested": false,
  "run_id": "169"
}