Fix Uptime Kuma check: SSH to pve173 instead of local pct exec
This commit is contained in:
+1
-1
@@ -43,6 +43,6 @@ POS-only daily news briefing for the **Epson TM-m30** receipt printer (`192.168.
|
||||
### Open threads
|
||||
|
||||
- [x] Update crontab to point to `/root/bin/POS-Automation/pos_briefing.py` — runs at 4:58 AM and 3:00 PM daily
|
||||
- [ ] Uptime Kuma check (`pct exec 147`) always returns None inside a CT — consider querying the Kuma HTTP status API instead
|
||||
- [x] Uptime Kuma check — Kuma is v1 (no REST API). Fixed by SSHing to `pve173` and running `pct exec 147` from there. Key auth already configured.
|
||||
- [ ] ETH-USD yfinance occasionally fails with NoneType — add per-ticker exception handling
|
||||
- [ ] Investigate why CT 166 intermittently cannot reach CT 120 (`192.168.0.157:80`) — check Proxmox firewall rules on the bridge
|
||||
|
||||
+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