Files
buryan-infra/ops/sprintA/vault-diag.sh
T

19 lines
897 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
echo "=== 1. Последние heartbeat vault (текст ошибки) ==="
pct exec 107 -- sqlite3 -column /opt/network-lxc/uptime/data/kuma.db \
"SELECT datetime(time) t, status, msg FROM heartbeat
WHERE monitor_id=(SELECT id FROM monitor WHERE name='vault.buryans.ru')
ORDER BY time DESC LIMIT 5;"
echo ""
echo "=== 2. curl из CT107 (глазами Kuma) ==="
pct exec 107 -- curl -s -o /dev/null -w "code=%{http_code} redirect=%{redirect_url}\n" -m 15 https://vault.buryans.ru/
echo ""
echo "=== 3. curl с VPS + напрямую в бэкенд ==="
ssh root@193.233.210.184 'curl -s -o /dev/null -w "public=%{http_code}\n" -m 15 https://vault.buryans.ru/; curl -s -o /dev/null -w "backend_109_8080=%{http_code}\n" -m 10 http://192.168.1.109:8080/'
echo ""
echo "=== 4. Что реально слушает CT109 ==="
pct exec 109 -- ss -tlnp | grep LISTEN | head -6