diff --git a/nagios/check_btrfs_quota.sh b/nagios/check_btrfs_quota.sh index e4ede15..50a70f5 100755 --- a/nagios/check_btrfs_quota.sh +++ b/nagios/check_btrfs_quota.sh @@ -109,6 +109,7 @@ check_freespace_is_above_threshold() { # 4: EXCL # 5: MAXRFER # 6: MAXEXCL +# 7: SUBVOLUMEPATH format_output_item() { local LOCAL_OUTPUT="" if [ "$5" != "none" ]; then @@ -125,7 +126,7 @@ format_output_item() { )" fi if [ -n "$LOCAL_OUTPUT" ]; then - printf "%s:%s (%s)" "$1" "$2" "$LOCAL_OUTPUT" + printf "%s:%s (%s)" "$1" "$2$( test -n "$7" && echo ":$7" )" "$LOCAL_OUTPUT" fi } @@ -175,7 +176,7 @@ while getopts hw:c:V: f; do # Loop on each qgroup # (the kinda weird <