progress
This commit is contained in:
parent
769d8116d5
commit
0f6d7874de
@ -1 +1 @@
|
|||||||
0.8.2.2
|
0.8.3
|
||||||
|
|||||||
@ -38,20 +38,13 @@ Metrics=()
|
|||||||
TempFiles=
|
TempFiles=
|
||||||
|
|
||||||
function cleanup {
|
function cleanup {
|
||||||
|
echo Cleaing up temporary files: ${TempFiles}
|
||||||
if [ "" != "${TempFiles}" ]; then
|
if [ "" != "${TempFiles}" ]; then
|
||||||
echo rm -f ${TempFiles}
|
|
||||||
rm -f ${TempFiles}
|
rm -f ${TempFiles}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
|
||||||
function new_tempfile {
|
|
||||||
tmpfile=$(mktemp)
|
|
||||||
TempFiles="${TempFiles} ${tmpfile}"
|
|
||||||
echo ${tmpfile}
|
|
||||||
}
|
|
||||||
|
|
||||||
function space_alert() {
|
function space_alert() {
|
||||||
ALERT_USAGE=75%
|
ALERT_USAGE=75%
|
||||||
for metric in "${Metrics[@]}"
|
for metric in "${Metrics[@]}"
|
||||||
@ -105,8 +98,12 @@ function storage_check() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpfile=$(new_tempfile)
|
tmpfile=$(mktemp)
|
||||||
tmpfile2=$(new_tempfile)
|
TempFiles="${TempFiles} ${tmpfile}"
|
||||||
|
|
||||||
|
tmpfile2=$(mktemp)
|
||||||
|
TempFiles="${TempFiles} ${tmpfile2}"
|
||||||
|
|
||||||
storage_check > ${tmpfile2}
|
storage_check > ${tmpfile2}
|
||||||
|
|
||||||
echo "## :card_file_box: STORAGE HEALTH CHECK" >> ${tmpfile}
|
echo "## :card_file_box: STORAGE HEALTH CHECK" >> ${tmpfile}
|
||||||
@ -116,8 +113,9 @@ echo "| --- | --- | --- |" >> ${tmpfile}
|
|||||||
cat ${tmpfile2} | sort -h -r | awk -F'%' '{printf "%s%%%s\n",$2,$3}' >> ${tmpfile}
|
cat ${tmpfile2} | sort -h -r | awk -F'%' '{printf "%s%%%s\n",$2,$3}' >> ${tmpfile}
|
||||||
cat ${tmpfile} | ${Sender} ${StatusChannel}
|
cat ${tmpfile} | ${Sender} ${StatusChannel}
|
||||||
|
|
||||||
Measurements=()
|
tmpfile=$(mktemp)
|
||||||
tmpfile=$(new_tempfile)
|
TempFiles="${TempFiles} ${tmpfile}"
|
||||||
|
|
||||||
space_alert > ${tmpfile}
|
space_alert > ${tmpfile}
|
||||||
if [ -s ${tmpfile} ]
|
if [ -s ${tmpfile} ]
|
||||||
then
|
then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user