Skip to main content

disk-size

Overview

Validates disk size meets specified criteria using comparison operators.

Command-Line Options

OptionTypeDefaultDescription
--volume / -vPathRequiredVolume to check size
--size-unitChoiceKSize unit: K, M, G, T (kilobytes, megabytes, gigabytes, terabytes)
--operatorChoiceRequiredComparison operator: >, <, =, <=, >=
--valueIntegerRequiredValue to compare against
--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)Size meets criteria
WARN (1)Command execution fails
CRITICAL (2)Size comparison fails

Usage Examples

disk-size - Minimum Size Check

health_checks check-storage disk-size \
--volume /scratch \
--size-unit T \
--operator ">=" \
--value 10 \
[CLUSTER] \
app

disk-size - Maximum Size Check

health_checks check-storage disk-size \
--volume /tmp \
--size-unit G \
--operator "<=" \
--value 500 \
[CLUSTER] \
app

disk-size - Exact Size Check

health_checks check-storage disk-size \
--volume /boot \
--size-unit M \
--operator "=" \
--value 512 \
[CLUSTER] \
app

disk-size - With Timeout

health_checks check-storage disk-size \
--volume /scratch \
--size-unit T \
--operator ">=" \
--value 10 \
--timeout 30 \
[CLUSTER] \
app