Update dsmon.sh
This commit is contained in:
2
dsmon.sh
2
dsmon.sh
@@ -229,7 +229,7 @@ CHECK(){
|
||||
D_WARNING_LEVEL=$(printf "%0.2f" $(jq -n 100-${WARNING_LEVEL}))
|
||||
D_CRITICAL_LEVEL=$(printf "%0.2f" $(jq -n 100-${CRITICAL_LEVEL}))
|
||||
# [ "${1}" != "report" ] && echo -e "${idsCL[Cyan]} ${DRIVEINFO_SHORTNAME[$DRIVE]}${spcA}${idsCL[$fs_status_color]}${DRIVEINFO_FREE[$DRIVE]} GB${spcB}${DRIVEINFO_FREEPER[$DRIVE]}%${spcC}${DRIVEINFO_TOT[$DRIVE]} GB${idsST[Reset]}${spcD}${idsCL[Cyan]}( ${idsCL[Yellow]}${D_WARNING_LEVEL}%${idsCL[Cyan]} / ${idsCL[RedBold]}${D_CRITICAL_LEVEL}%${idsST[Reset]}${idsCL[Cyan]} )${idsCL[Default]}"
|
||||
[ "${1}" != "report" ] && printf "%-20s %-10s %-10s %-16s %-20s\n" "${idsCLf[Cyan]}${DRIVEINFO_SHORTNAME[$DRIVE]}" "${idsCLf[$fs_status_color]}${DRIVEINFO_FREE[$DRIVE]} GB" "${DRIVEINFO_FREEPER[$DRIVE]}%" "${DRIVEINFO_TOT[$DRIVE]} GB" "${idsCLf[Cyan]}( ${D_WARNING_LEVEL}% / ${D_CRITICAL_LEVEL}% )( ${idsCLf[Yellow]}${D_WARNING_LEVEL}%${idsCLf[Cyan]} / ${idsCLf[Red]}${D_CRITICAL_LEVEL}%${idsCLf[Cyan]} )${idsCLf[Default]}"
|
||||
[ "${1}" != "report" ] && printf "%-20s %-10s %-10s %-16s %-20s\n" "${idsCLf[Normal]}${idsCLf[Cyan]}${DRIVEINFO_SHORTNAME[$DRIVE]}" "${idsCLf[$fs_status_color]}${DRIVEINFO_FREE[$DRIVE]} GB" "${DRIVEINFO_FREEPER[$DRIVE]}%" "${DRIVEINFO_TOT[$DRIVE]} GB" "${idsCLf[Cyan]}( ${D_WARNING_LEVEL}% / ${D_CRITICAL_LEVEL}% )( ${idsCLf[Yellow]}${D_WARNING_LEVEL}%${idsCLf[Cyan]} / ${idsCLf[Red]}${D_CRITICAL_LEVEL}%${idsCLf[Cyan]} )${idsCLf[Default]}"
|
||||
|
||||
if [ "${fs_status}" != "Normal" ] && [ "${1}" = "report" ]; then
|
||||
# echo -e "${host_name[$hostid]} - (${host_ip[$hostid]})\n\n${DRIVE} : ${DRIVEINFO_FREE[$DRIVE]}GB out of ${DRIVEINFO_TOT[$DRIVE]}GB Free (${DRIVEINFO_FREEPER[$DRIVE]}%)\n\n$(date)" | mail -s "Free Space ${fs_status}: '${host_name[$hostid]}'" ${ALERT_EMAIL}
|
||||
|
||||
Reference in New Issue
Block a user