diff --git a/traefik.yml b/traefik.yml index f57e000..7e9bb1e 100644 --- a/traefik.yml +++ b/traefik.yml @@ -260,6 +260,18 @@ g_echo_error "Error while connecting ${host} with wget: $(cat ${g_tmp}/traefik-wget-check)" + else + [ -f "${g_tmp}/$host-502" ] && rm "${g_tmp}/$host-502" + fi + if egrep -q "502 Bad Gateway" ${g_tmp}/traefik-wget-check + then + if [ -s "${g_tmp}/$host-502" ] && find "${g_tmp}/$host-502" | grep "$host-502" -mmin +15 + then + g_echo_error "Error while connecting ${host} with wget: + $(cat ${g_tmp}/traefik-wget-check)" + else + date >"${g_tmp}/$host-502" + fi fi fi done