feat(mcp): Traefik routers, certificates and traffic (#5838)
list_routers grades every router as the Traefik page does (the last 15 minutes, 5xx on its cutoff, 4xx and p95 against the router's normal) and gives a troubled one its status codes, what they mean and the swarm service behind it. get_router adds its history, codes, normal and anomalies; list_certificates the served certificates and the routers they cover; get_traffic the access log's clients, countries and routers. get_overview names a router answering 5xx and a certificate near expiry. The access-log aggregation moves into routes.summarize_access, shared by the traffic page and get_traffic. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -62,3 +62,13 @@ def get_alert_metrics() -> dict[str, list[str]]:
|
||||
return {"traefik": ["request_rate", "error_rate_4xx_pct", "error_rate_5xx_pct",
|
||||
"latency_p50_ms", "latency_p95_ms", "latency_p99_ms",
|
||||
"response_bytes_rate", "cert_expiry_days"]}
|
||||
|
||||
|
||||
def register_mcp_tools(register) -> None:
|
||||
from .mcp_tools import register_tools
|
||||
register_tools(register)
|
||||
|
||||
|
||||
async def mcp_overview(db) -> list[dict]:
|
||||
from .mcp_tools import mcp_overview as findings
|
||||
return await findings(db)
|
||||
|
||||
Reference in New Issue
Block a user