Skip to main content

disk-usage

Overview

Monitors disk space or inode usage on specified volumes with configurable warning and critical thresholds.

Command-Line Options

OptionTypeDefaultDescription
--volume / -vPathRequiredVolume(s) to check for free space (multiple allowed)
--usage-critical-thresholdInteger85Critical threshold percentage (0-100)
--usage-warning-thresholdInteger80Warning threshold percentage (0-100)
--inode-check / --no-inode-checkFlagFalseCheck inode usage instead of disk space
--timeoutInteger300Command execution timeout in seconds
--sinkStringdo_nothingTelemetry sink destination
--sink-optsMultiple-Sink-specific configuration
--verbose-outFlagFalseDisplay detailed output
--log-levelChoiceINFODEBUG, INFO, WARNING, ERROR, CRITICAL
--log-folderString/var/log/fb-monitoringLog directory
--heterogeneous-cluster-v1FlagFalseEnable heterogeneous cluster support

Exit Conditions

Exit CodeCondition
OK (0)Feature flag disabled (killswitch active)
OK (0)Usage within limits
WARN (1)Usage exceeds warning threshold
WARN (1)Command execution failed
CRITICAL (2)Usage exceeds critical threshold

Usage Examples

disk-usage - Single Volume

health_checks check-storage disk-usage \
--volume /home \
--usage-warning-threshold 75 \
--usage-critical-threshold 90 \
[CLUSTER] \
app

disk-usage - Multiple Volumes

health_checks check-storage disk-usage \
--volume /home \
--volume /scratch \
--volume /tmp \
[CLUSTER] \
app

disk-usage - Inode Check

health_checks check-storage disk-usage \
--volume /var \
--inode-check \
--usage-critical-threshold 95 \
[CLUSTER] \
app

disk-usage - With Telemetry

health_checks check-storage disk-usage \
--volume /home \
--sink otel \
--sink-opts "log_resource_attributes={'attr_1': 'value1'}" \
[CLUSTER] \
app