INNER CODE UNIT · Python

clear_metrics_cache

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

def clear_metrics_cache():
    """Reset the metrics cache, forcing the next fetch to hit Prometheus."""
    _metrics_cache["data"] = None
    _metrics_cache["timestamp"] = 0

# Get logger instance
logger = get_logger()

# Health check tool for Docker containers and monitoring
@mcp.tool(
    name=_tool_name("health_check"),
    description="Health check endpoint for container monitoring and status verification",
    annotations={
        "title": "Health Check",
        "icon": "❤️",
        "readOnlyHint": True,
        "destructiveHint": False,
        "idempotentHint": True,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…