Botica.Batteries.Disk (Botica v2.1.0)

Copy Markdown View Source

Predefined health check for disk space usage.

This module provides a check that monitors disk consumption and warns when available space falls below safe thresholds.

Uses Arrea.Command.execute/2 with LC_ALL=C so the parser always sees the English output regardless of the host locale (a Spanish- or French-locale host would otherwise emit localized column headers and break the parser).

Usage

config = %{
  app_name: "myapp",
  checks: [
    Botica.Batteries.Disk.check(path: "/", warning_threshold: 80, error_threshold: 95)
  ]
}

Options

  • :path - Path to check (default: "/")
  • :warning_threshold - Disk % to trigger warning (default: 80)
  • :error_threshold - Disk % to trigger error (default: 95)
  • :timeout - Check timeout in ms (default: 5000)

Summary

Functions

Checks disk space usage for a given path.

Functions

check_disk(path, warning_threshold, error_threshold)

Checks disk space usage for a given path.