diff --git a/dsmon.sh b/dsmon.sh index 9dd29d7..4499364 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -118,12 +118,12 @@ CHECK(){ if (( $(bc <<<"$dfreeper <= 15") )); then fs_status='error' fs_status_color='Red' - if [ "${ALERT_EMAIL}" != "" ]; then echo -e "${dname} : ${dfree} MB free\t$(date)" | mail -s "Free Space Critical: '${NM_NODETYPES[$NTYPE]}-Node${nid}'" ${ALERT_EMAIL}; fi + if [ "${ALERT_EMAIL}" != "" ]; then echo -e "${host_name[$hostid]} - (${host_ip[$hostid]})\n${dname} : ${dfree} MB free\t$(date)" | mail -s "Free Space Critical: '${host_name[$hostid]}'" ${ALERT_EMAIL}; fi elif (( $(bc <<<"$dfreeper <= 25") )); then fs_status='warn' fs_status_color='Yellow' - if [ "${ALERT_EMAIL}" != "" ]; then echo -e "${dname} : ${dfree} MB free\t$(date)" | mail -s "Free Space Warning: '${NM_NODETYPES[$NTYPE]}-Node${nid}'" ${ALERT_EMAIL}; fi + if [ "${ALERT_EMAIL}" != "" ]; then echo -e "${host_name[$hostid]} - (${host_ip[$hostid]})\n${dname} : ${dfree} MB free\t$(date)" | mail -s "Free Space Warning: '${host_name[$hostid]}'" ${ALERT_EMAIL}; fi else fs_status=''