Update dsmon.sh

This commit is contained in:
2023-01-02 15:53:00 -06:00
parent eee9be0cd3
commit 8bb8ee61cd

View File

@@ -106,9 +106,9 @@ CHECK(){
for hostname in "${hostnames_sort[@]}"; do
hostid=${host_ids[$hostname]}
if [ "${1}" != "report" ]; then
echo -e "${idsST[Bold]}"; DIVIDER false lightCyan 100
echo -e "${idsST[Bold]}"; DIVIDER false lightCyan 90
echo -e "${idsCL[LightCyan]} ${host_name[$hostid]} - Drive Space Check${idsCL[Default]}"
DIVIDER false lightCyan 100
DIVIDER false lightCyan 90
fi
checkhost=$(CHECK_HOST ${host_ip[$hostid]})
@@ -171,7 +171,7 @@ CHECK(){
# echo
if [ "${1}" != "report" ]; then
c=0; cw=40; spcA=''
c=0; cw=30; spcA=''
spc1=`expr ${cw} - 5`
until [ $c = ${spc1} ]; do spcA="${spcA} "; c=`expr $c + 1`; done
c=0; cw=10; spcB=''
@@ -196,8 +196,8 @@ CHECK(){
CRITICAL_LEVEL=$(printf "%0.2f" $(jq -n $WARNING_LEVEL-$WARNING_LEVEL/2))
if [ "${1}" != "report" ]; then
c=0; cw=40; spcA=''
spc1=`expr ${cw} - ${#DRIVE}`
c=0; cw=30; spcA=''
spc1=`expr ${cw} - ${#DRIVEINFO_SHORTNAME[$DRIVE]}`
until [ $c = ${spc1} ]; do spcA="${spcA} "; c=`expr $c + 1`; done
c=0; cw=10; spcB=''
spc2=`expr ${cw} - ${#DRIVEINFO_FREE[$DRIVE]}`