From b3337fd27b528fab5480e534e0b8506ccec919a5 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 3 Apr 2025 18:06:43 -0500 Subject: [PATCH] Update dsmon.sh --- dsmon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dsmon.sh b/dsmon.sh index 8dd1837..8d1207e 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -300,13 +300,13 @@ RUN_CHECK(){ maillogsize=$(ssh -o BatchMode=yes -o ConnectTimeout=3 root@${host_ip[$hostid]} du -hs /var/log/mail.log | cut -d'/' -f 1) if [[ "${maillogsize}" = *'M'* ]]; then if [ ! -f /tmp/dsmon.mail-log.${host_ip[$hostid]}.errorsent ] || ([ -f /tmp/dsmon.mail-log.${host_ip[$hostid]}.errorsent ] && [ $(expr $(date +%s) - $(stat -c %Y /tmp/dsmon.mail-log.${host_ip[$hostid]}.errorsent)) -gt 3600 ]); then - SENDNOTICE "Mail Log Getting Big" "Mail log getting big (${maillogsize// /}) on hostname [${host_ip[$hostid]}]" 1 + SENDNOTICE "Mail Log Getting Big" "Mail log getting big (${maillogsize//[[:blank:]]/}) on ${hostname} [${host_ip[$hostid]}]" 1 touch /tmp/dsmon.mail-log.${host_ip[$hostid]}.errorsent fi elif [ -f /tmp/dsmon.mail-log.${host_ip[$hostid]}.errorsent ]; then rm -f /tmp/dsmon.mail-log.${host_ip[$hostid]}.errorsent fi - + echo "mailLog: ${hostname} = '${maillogsize//[[:blank:]]/}'" else # [ "${1}" != "report" ] &&