X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=check-remote-mailqs;h=fa3dbf8e6e90e18c4063eb6b41a62075bbbcdf6f;hb=1b4699d0e925e873b88137b1e07dfd24bac0ac49;hp=d37ec7aa7b368ee9a0b85a2445cb419ddaa07199;hpb=fa5deaee2e0182ddfc7b39eea7ee2acedb259ddf;p=distro-setup diff --git a/check-remote-mailqs b/check-remote-mailqs index d37ec7a..fa3dbf8 100755 --- a/check-remote-mailqs +++ b/check-remote-mailqs @@ -9,8 +9,9 @@ source /a/bin/errhandle/err shopt -s nullglob shopt -s dotglob +# temp disabled: x2wg kwwg # this list duplicated in brc2 ralerts -for h in bk je li frodo kwwg x3wg x2wg kdwg sywg; do +for h in bk je li x3wg kdwg sywg; do statedir=/b/bash_unpublished/mailq-state statefile=$statedir/$h [[ -d $statedir ]] || continue @@ -26,8 +27,16 @@ for h in bk je li frodo kwwg x3wg x2wg kdwg sywg; do else if [[ -s $statefile ]]; then logsec=$(date +%s -d "$(head -n1 $statefile | awk '{print $1,$2}')") - if (( logsec < EPOCHSECONDS - 60*60*20 )); then - echo $0: host $h ssh /usr/local/bin/check-mailq fail for over 20 hours + case h in + frodo) + hours=200 + ;; + *) + hours=20 + ;; + esac + if (( logsec < EPOCHSECONDS - 60*60*hours )); then + echo $0: host $h ssh /usr/local/bin/check-mailq fail for over $hours hours fi fi printf "%s\n" "$c" | ts "%F %T" >> $statefile