fix(ops): avoid false Cordn announce alerts from SIGPIPE
This commit is contained in:
parent
20b2b0d676
commit
c4a1671f81
1 changed files with 4 additions and 3 deletions
|
|
@ -53,9 +53,10 @@ avail=$(free -m | awk '/Mem:/{print $7}')
|
||||||
cordn_rejects=$(docker logs --since 15m newlay-newlay-1 2>&1 | grep -c 'cordn rate limit' || true)
|
cordn_rejects=$(docker logs --since 15m newlay-newlay-1 2>&1 | grep -c 'cordn rate limit' || true)
|
||||||
[ "${cordn_rejects:-0}" -ge 40 ] && ISSUES+=("cordn rate limits: ${cordn_rejects} rejects in 15m")
|
[ "${cordn_rejects:-0}" -ge 40 ] && ISSUES+=("cordn rate limits: ${cordn_rejects} rejects in 15m")
|
||||||
|
|
||||||
if ! docker logs --since 20m newlay-newlay-1 2>&1 | grep -q 'cordn announce'; then
|
# `grep -q` + pipefail makes `docker logs` exit 141 on SIGPIPE, which used to
|
||||||
ISSUES+=("cordn coordinator has not announced in 20m")
|
# make this check fire even when an announcement was present. Count instead.
|
||||||
fi
|
cordn_announce=$(docker logs --since 20m newlay-newlay-1 2>&1 | grep -c 'cordn announce' || true)
|
||||||
|
[ "${cordn_announce:-0}" -eq 0 ] && ISSUES+=("cordn coordinator has not announced in 20m")
|
||||||
|
|
||||||
# TLS expiry (Caddy auto-renews; this catches a broken renewal early).
|
# TLS expiry (Caddy auto-renews; this catches a broken renewal early).
|
||||||
expiry=$(echo | openssl s_client -servername relay.skate-spots.org -connect relay.skate-spots.org:443 2>/dev/null \
|
expiry=$(echo | openssl s_client -servername relay.skate-spots.org -connect relay.skate-spots.org:443 2>/dev/null \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue