Update architecture and backup documentation to include Healthchecks integration
Add Healthchecks service details to architecture and backup documentation, including its role as a Dead man's switch for backups. Update backup scripts to utilize systemd timers instead of cron for improved scheduling. Enhance network topology documentation to reflect Healthchecks integration in the VPS Miran setup. This update clarifies backup processes and enhances overall system reliability.
This commit is contained in:
20
scripts/healthcheck-ping.sh
Executable file
20
scripts/healthcheck-ping.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
# Ping Healthchecks после успешного окна бэкапов (Dead man's switch).
|
||||
# Если ping не пришёл — Healthchecks шлёт алерт в Telegram.
|
||||
# Конфиг: /root/.healthchecks.env (HEALTHCHECKS_URL, HEALTHCHECKS_HOMELAB_UUID)
|
||||
|
||||
CONFIG="${HEALTHCHECKS_CONFIG:-/root/.healthchecks.env}"
|
||||
if [ -f "$CONFIG" ]; then
|
||||
set -a
|
||||
# shellcheck source=/dev/null
|
||||
source "$CONFIG"
|
||||
set +a
|
||||
fi
|
||||
|
||||
HC_URL="${HEALTHCHECKS_URL:-https://healthchecks.katykhin.ru}"
|
||||
HC_UUID="${HEALTHCHECKS_HOMELAB_UUID:-}"
|
||||
|
||||
[ -z "$HC_UUID" ] && exit 0
|
||||
|
||||
curl -fsS --retry 3 --max-time 10 "${HC_URL}/ping/${HC_UUID}" >/dev/null 2>&1 || true
|
||||
exit 0
|
||||
Reference in New Issue
Block a user