From 180e3f89cf74e913053e7402810001ea7d85df0a Mon Sep 17 00:00:00 2001 From: Oleg Sheynin Date: Thu, 13 Jun 2024 18:03:43 -0400 Subject: [PATCH] fix --- release_version.txt | 2 +- scripts/healthcheck/storage_health_check.sh | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/release_version.txt b/release_version.txt index 6f4eebd..5ee5d6a 100644 --- a/release_version.txt +++ b/release_version.txt @@ -1 +1 @@ -0.8.1 +0.8.1.1 diff --git a/scripts/healthcheck/storage_health_check.sh b/scripts/healthcheck/storage_health_check.sh index 91e1afd..421ac57 100755 --- a/scripts/healthcheck/storage_health_check.sh +++ b/scripts/healthcheck/storage_health_check.sh @@ -38,12 +38,15 @@ Metrics=() function space_alert() { ALERT_USAGE=75% - for ln in "${Measurements[@]}" + for metric in "${Metrics[@]}" do - IFS=$' '; args=($ln); unset IFS + IFS=$' '; args=($metric); unset IFS host=${args[0]} fs=${args[1]} space_used=${args[2]} + + echo "if [ ${space_used%?} -ge ${ALERT_USAGE%?} ]; then" >&2 + if [ ${space_used%?} -ge ${ALERT_USAGE%?} ]; then echo ":red_circle: Filesystem **${host}:${fs}** is using **${space_used}** :red_circle:" fi