Initial commit from Martins Github

This commit is contained in:
Jake Kasper
2026-04-23 13:50:31 -05:00
parent 488a0d01ef
commit 3228db3097
30 changed files with 4377 additions and 1 deletions

12
app/routers/network.py Normal file
View File

@@ -0,0 +1,12 @@
from fastapi import APIRouter
from app.services import prometheus
router = APIRouter()
@router.get("/network/status")
async def network_status():
nfs = await prometheus.get_nf_status()
up = sum(1 for n in nfs if n["state"] == "up")
down = sum(1 for n in nfs if n["state"] == "down")
return {"nfs": nfs, "summary": {"up": up, "down": down, "total": len(nfs)}}