← back to Chief Of Operations
monitor all configured exo hosts
777f58613b1280dc3844adb27fe0204fb7d19e5b · 2026-09-17 09:06:33 -0700 · Steve Abrams
Files touched
Diff
commit 777f58613b1280dc3844adb27fe0204fb7d19e5b
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Sep 17 09:06:33 2026 -0700
monitor all configured exo hosts
---
chief_ops.py | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/chief_ops.py b/chief_ops.py
index c9ea583..e52c506 100755
--- a/chief_ops.py
+++ b/chief_ops.py
@@ -2,6 +2,7 @@
"""Chief of Operations: read-first oversight for layout, dotbar, tickets, and Plannator."""
from __future__ import annotations
import argparse, json, os, subprocess, time, urllib.request, urllib.error
+import socket
from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
from pathlib import Path
@@ -48,6 +49,28 @@ def http_health(port, path='/health'):
return {'ok': None, 'status': 'unverified-in-sandbox', 'error': msg}
return {'ok': False, 'error': msg}
+def exo_ring():
+ env=HOME/'ai-cluster/.env'
+ hosts=[]
+ if env.exists():
+ for line in env.read_text(errors='replace').splitlines():
+ if line.startswith('EXO_HOSTS='):
+ hosts=[x.strip() for x in line.split('=',1)[1].split(',') if x.strip()]
+ results=[]
+ for item in hosts:
+ host,_,port=item.rpartition(':'); port=int(port or 52415)
+ s=socket.socket(); s.settimeout(2); started=time.time()
+ try:
+ s.connect((host,port)); results.append({'host':host,'port':port,'online':True,'latency_ms':round((time.time()-started)*1000,1)})
+ except Exception as e:
+ msg=str(e)
+ results.append({'host':host,'port':port,'online':None if 'Operation not permitted' in msg else False,'error':msg})
+ finally: s.close()
+ online=sum(x['online'] is True for x in results); unknown=sum(x['online'] is None for x in results)
+ ok=None if unknown else (bool(results) and online==len(results))
+ return {'ok':ok,'online':online,'unknown':unknown,'configured':len(results),'hosts':results,
+ 'status':'unverified-in-sandbox' if unknown else ('all-online' if online==len(results) else ('partial' if online else 'offline'))}
+
def router_evidence():
log = ROUTER/'data/router.jsonl'
@@ -145,6 +168,7 @@ def check():
'dotbar_health': http_health(9787),
'plannator_health': http_health(9772),
'plannator_state': plannator_state(),
+ 'exo_ring': exo_ring(),
'ticket_queue': ticket_queue(write=True),
'router_evidence': router_evidence(),
'legacy_conflicts_archived': {'ok': all(x in archived for x in ('arrange','tile-blue-right','tile-green-left')), 'items': archived},
← 5859065 auto-claim one DW-priority open ticket
·
back to Chief Of Operations
·
Keep Chief Ops watching Exo ring 717d12e →