INNER CODE UNIT · Python

health_check

pab1it0/prometheus-mcp-server · src/prometheus_mcp_server/server.py:63

async def health_check() -> Dict[str, Any]:
    """Return health status of the MCP server and Prometheus connection.

    Returns:
        Health status including service information, configuration, and connectivity
    """
    try:
        health_status = {
            "status": "healthy",
            "service": "prometheus-mcp-server",
            "version": "1.6.2",
            "timestamp": datetime.utcnow().isoformat(),
            "transport": config.mcp_server_config.mcp_server_transport if config.mcp_server_config else "stdio",
            "configuration": {
                "prometheus_url_configured": bool(config.url),
                "authentication_configured": bool(config.username or config.token or config.client_cert),
                "org_id_configured": bool(config.org_id)
            }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…