fix
This commit is contained in:
parent
80bbf47755
commit
180e3f89cf
@ -1 +1 @@
|
|||||||
0.8.1
|
0.8.1.1
|
||||||
|
|||||||
@ -38,12 +38,15 @@ Metrics=()
|
|||||||
|
|
||||||
function space_alert() {
|
function space_alert() {
|
||||||
ALERT_USAGE=75%
|
ALERT_USAGE=75%
|
||||||
for ln in "${Measurements[@]}"
|
for metric in "${Metrics[@]}"
|
||||||
do
|
do
|
||||||
IFS=$' '; args=($ln); unset IFS
|
IFS=$' '; args=($metric); unset IFS
|
||||||
host=${args[0]}
|
host=${args[0]}
|
||||||
fs=${args[1]}
|
fs=${args[1]}
|
||||||
space_used=${args[2]}
|
space_used=${args[2]}
|
||||||
|
|
||||||
|
echo "if [ ${space_used%?} -ge ${ALERT_USAGE%?} ]; then" >&2
|
||||||
|
|
||||||
if [ ${space_used%?} -ge ${ALERT_USAGE%?} ]; then
|
if [ ${space_used%?} -ge ${ALERT_USAGE%?} ]; then
|
||||||
echo ":red_circle: Filesystem **${host}:${fs}** is using **${space_used}** :red_circle:"
|
echo ":red_circle: Filesystem **${host}:${fs}** is using **${space_used}** :red_circle:"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user