From e08010bfdfec8b1cc72bd58d8ae68c07d73196af Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 3 Apr 2025 18:10:26 -0500 Subject: [PATCH] update --- defaults.inc | 2 +- dsmon.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/defaults.inc b/defaults.inc index 6fca02e..6499954 100755 --- a/defaults.inc +++ b/defaults.inc @@ -1,6 +1,6 @@ #!/usr/bin/env bash -VERS=2.3.45c-04032025 +VERS=2.3.46-04032025 DS_FOLDER=/opt/idssys/dsmon DS_CRONTAB_FOLDER=/opt/idssys/nodemgmt/crontabs diff --git a/dsmon.sh b/dsmon.sh index 707f1b8..5afbb4a 100755 --- a/dsmon.sh +++ b/dsmon.sh @@ -298,7 +298,7 @@ RUN_CHECK(){ unset DRIVEINFO_TOT DRIVEINFO_FREE DRIVEINFO_FREEPER DRIVEINFO_SHORTNAME DRIVES DRIVEINFO host_limits_tmp maillogsize=$(ssh -o BatchMode=yes -o ConnectTimeout=3 root@${host_ip[$hostid]} du -hs /var/log/mail.log | cut -d'/' -f 1) - if [[ "${maillogsize//[[:blank:]]/}" = *'M'* ]]; then + if [[ "${maillogsize//[[:blank:]]/}" = *'G'* ]]; 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//[[:blank:]]/}) on ${hostname} [${host_ip[$hostid]}]" 1 touch /tmp/dsmon.mail-log.${host_ip[$hostid]}.errorsent