[Watchdog] Minor change to Dovecot health check
parent
b3e770c94b
commit
be538dd94e
|
@ -458,7 +458,7 @@ dovecot_repl_checks() {
|
||||||
progress "Dovecot replication" ${THRESHOLD} $(( ${THRESHOLD} - ${err_count} )) ${diff_c}
|
progress "Dovecot replication" ${THRESHOLD} $(( ${THRESHOLD} - ${err_count} )) ${diff_c}
|
||||||
if [[ $? == 10 ]]; then
|
if [[ $? == 10 ]]; then
|
||||||
diff_c=0
|
diff_c=0
|
||||||
sleep 1
|
sleep 60
|
||||||
else
|
else
|
||||||
diff_c=0
|
diff_c=0
|
||||||
sleep $(( ( RANDOM % 60 ) + 20 ))
|
sleep $(( ( RANDOM % 60 ) + 20 ))
|
||||||
|
@ -1008,15 +1008,19 @@ while true; do
|
||||||
[[ ! -z ${WATCHDOG_NOTIFY_EMAIL} ]] && mail_error "${com_pipe_answer}"
|
[[ ! -z ${WATCHDOG_NOTIFY_EMAIL} ]] && mail_error "${com_pipe_answer}"
|
||||||
elif [[ ${com_pipe_answer} == "external_checks" ]]; then
|
elif [[ ${com_pipe_answer} == "external_checks" ]]; then
|
||||||
log_msg "Your mailcow is an open relay!"
|
log_msg "Your mailcow is an open relay!"
|
||||||
|
# Define $2 to override message text, else print service was restarted at ...
|
||||||
[[ ! -z ${WATCHDOG_NOTIFY_EMAIL} ]] && mail_error "${com_pipe_answer}" "Please stop mailcow now and check your network configuration!"
|
[[ ! -z ${WATCHDOG_NOTIFY_EMAIL} ]] && mail_error "${com_pipe_answer}" "Please stop mailcow now and check your network configuration!"
|
||||||
elif [[ ${com_pipe_answer} == "mysql_repl_checks" ]]; then
|
elif [[ ${com_pipe_answer} == "mysql_repl_checks" ]]; then
|
||||||
log_msg "MySQL replication is not working properly"
|
log_msg "MySQL replication is not working properly"
|
||||||
[[ ! -z ${WATCHDOG_NOTIFY_EMAIL} ]] && mail_error "${com_pipe_answer}" "Please check doveadm replicator status"
|
# Define $2 to override message text, else print service was restarted at ...
|
||||||
|
[[ ! -z ${WATCHDOG_NOTIFY_EMAIL} ]] && mail_error "${com_pipe_answer}" "Please check the SQL replication status"
|
||||||
elif [[ ${com_pipe_answer} == "dovecot_repl_checks" ]]; then
|
elif [[ ${com_pipe_answer} == "dovecot_repl_checks" ]]; then
|
||||||
log_msg "Dovecot replication is not working properly" "Please check doveadm replicator status"
|
log_msg "Dovecot replication is not working properly"
|
||||||
[[ ! -z ${WATCHDOG_NOTIFY_EMAIL} ]] && mail_error "${com_pipe_answer}"
|
# Define $2 to override message text, else print service was restarted at ...
|
||||||
|
[[ ! -z ${WATCHDOG_NOTIFY_EMAIL} ]] && mail_error "${com_pipe_answer}" "Please check the Dovecot replicator status"
|
||||||
elif [[ ${com_pipe_answer} == "acme-mailcow" ]]; then
|
elif [[ ${com_pipe_answer} == "acme-mailcow" ]]; then
|
||||||
log_msg "acme-mailcow did not complete successfully"
|
log_msg "acme-mailcow did not complete successfully"
|
||||||
|
# Define $2 to override message text, else print service was restarted at ...
|
||||||
[[ ! -z ${WATCHDOG_NOTIFY_EMAIL} ]] && mail_error "${com_pipe_answer}" "Please check acme-mailcow for further information."
|
[[ ! -z ${WATCHDOG_NOTIFY_EMAIL} ]] && mail_error "${com_pipe_answer}" "Please check acme-mailcow for further information."
|
||||||
elif [[ ${com_pipe_answer} == "fail2ban" ]]; then
|
elif [[ ${com_pipe_answer} == "fail2ban" ]]; then
|
||||||
F2B_RES=($(timeout 4s ${REDIS_CMDLINE} --raw GET F2B_RES 2> /dev/null))
|
F2B_RES=($(timeout 4s ${REDIS_CMDLINE} --raw GET F2B_RES 2> /dev/null))
|
||||||
|
|
Loading…
Reference in New Issue