-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsystem.py
More file actions
34 lines (31 loc) · 1.05 KB
/
Copy pathsystem.py
File metadata and controls
34 lines (31 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""
System status and diagnostics endpoints
"""
from fastapi import APIRouter, HTTPException
from datetime import datetime, timezone
import structlog
from src.config.settings import get_settings
router = APIRouter(prefix="/system", tags=["system-status"])
logger = structlog.get_logger()
settings = get_settings()
@router.get("/status")
async def system_status():
try:
now = datetime.now(timezone.utc).isoformat()
return {
"status": "ok",
"timestamp": now,
"app": settings.APP_NAME,
"version": settings.APP_VERSION,
"environment": settings.ENVIRONMENT,
"features": {
"multi_llm": settings.ENABLE_MULTI_LLM,
"epss": settings.ENABLED_EPSS,
"kev": settings.ENABLED_KEV,
"vex": settings.ENABLED_VEX,
"rss_sidecar": settings.ENABLED_RSS_SIDECAR,
}
}
except Exception as e:
logger.error(f"system_status failed: {e}")
raise HTTPException(status_code=500, detail=str(e))