Fix Uptime Kuma check: SSH to pve173 instead of local pct exec
This commit is contained in:
+4
-3
@@ -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", ", ")
|
||||
|
||||
Reference in New Issue
Block a user