Predefined health check for system memory usage.
This module provides a check that monitors memory consumption and warns when it exceeds safe thresholds.
Uses Apero.OS.type/0 to dispatch directly between Linux (free)
and macOS (vm_stat) instead of a blind fallback. All command
execution is routed through Command.execute/2 so consumers get
real timeout cancellation, telemetry, and structured errors.
Usage
config = %{
app_name: "myapp",
checks: [
Botica.Batteries.Memory.check(warning_threshold: 80, error_threshold: 95)
]
}Options
:warning_threshold- Memory % to trigger warning (default: 80):error_threshold- Memory % to trigger error (default: 95):timeout- Check timeout in ms (default: 5000)
Summary
Functions
Checks system memory usage. Dispatches Linux vs macOS via Apero.OS.type/0.
Functions
@spec check_memory(non_neg_integer(), non_neg_integer()) :: Botica.Types.check_result()
Checks system memory usage. Dispatches Linux vs macOS via Apero.OS.type/0.