INNER CODE UNIT · Python

get_targets

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

async def get_targets(
    state: str = "active",
    scrape_pool: Optional[str] = None,
    limit: Optional[int] = None,
    offset: int = 0,
) -> Dict[str, Any]:
    """Get information about Prometheus scrape targets.

    Args:
        state: Which targets to request from Prometheus - "active" (default),
            "dropped", or "any". This is applied server-side by Prometheus.
        scrape_pool: Optional scrape pool name to restrict results to, applied
            server-side by Prometheus.
        limit: Maximum number of targets to return per category (default: all)
        offset: Number of targets to skip for pagination (default: 0)

    Returns:
        Dictionary containing:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…