Fix Uptime Kuma check: SSH to pve173 instead of local pct exec

This commit is contained in:
2026-03-17 01:32:26 -04:00
parent 393de540ee
commit cd05366c78
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -293,10 +293,11 @@ def get_financial_snapshot():
def get_uptime_kuma_status():
try:
res = os.popen(
"pct exec 147 -- sqlite3 /app/uptime-kuma/data/kuma.db "
"\"SELECT name FROM monitor WHERE active = 1 AND id IN "
"ssh -o StrictHostKeyChecking=no pve173 "
"\"pct exec 147 -- sqlite3 /app/uptime-kuma/data/kuma.db "
"'SELECT name FROM monitor WHERE active = 1 AND id IN "
"(SELECT monitor_id FROM heartbeat WHERE id IN "
"(SELECT MAX(id) FROM heartbeat GROUP BY monitor_id) AND status = 0);\""
"(SELECT MAX(id) FROM heartbeat GROUP BY monitor_id) AND status = 0);'\""
).read().strip()
if res:
return res.replace("\n", ", ")