feat: add router health metrics to node_cache and node-guardian
- Add migration 042_node_cache_router_metrics.sql - Node guardian now collects router health and sends in heartbeat - City-service uses cached router_healthy from node_cache - This allows NODE2 router status to be displayed correctly
This commit is contained in:
@@ -3373,7 +3373,7 @@ async def get_node_endpoints(node_id: str) -> Dict[str, str]:
|
||||
|
||||
async def get_node_metrics(node_id: str) -> Optional[Dict[str, Any]]:
|
||||
"""
|
||||
Отримати розширені метрики ноди (включаючи Swapper).
|
||||
Отримати розширені метрики ноди (включаючи Swapper та Router).
|
||||
"""
|
||||
pool = await get_pool()
|
||||
|
||||
@@ -3385,7 +3385,9 @@ async def get_node_metrics(node_id: str) -> Optional[Dict[str, Any]]:
|
||||
swapper_models_total,
|
||||
swapper_state,
|
||||
router_url,
|
||||
swapper_url
|
||||
swapper_url,
|
||||
router_healthy,
|
||||
router_version
|
||||
FROM node_cache
|
||||
WHERE node_id = $1
|
||||
""", node_id)
|
||||
|
||||
Reference in New Issue
Block a user