prometheus_scrape_pool_targets
Retrieve monitoring targets for a specific Prometheus scrape pool to analyze and manage your infrastructure metrics.
Instructions
Get targets for a specific scrape pool
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scrapePool | Yes | scrape pool name |
Implementation Reference
- src/server/tools.ts:72-74 (schema)Zod input schema for the prometheus_scrape_pool_targets tool requiring a scrapePool name.const PrometheusScrapePoolTargetsSchema = z.object({ scrapePool: z.string().describe("scrape pool name"), });
- src/server/tools.ts:141-150 (registration)Tool registration including name, schema reference, description, and inline handler that delegates to PrometheusClient.getScrapePoolTargets.defineTool<typeof PrometheusScrapePoolTargetsSchema, TargetsResult>({ capability: "discovery", name: "prometheus_scrape_pool_targets", title: "Get Scrape Pool Targets", description: "Get targets for a specific scrape pool", inputSchema: PrometheusScrapePoolTargetsSchema, type: "readonly", handle: async (client: PrometheusClient, args) => client.getScrapePoolTargets(args.scrapePool), }),
- src/prometheus/client.ts:260-262 (handler)PrometheusClient.getScrapePoolTargets method called by the tool handler, delegating to listTargets.async getScrapePoolTargets(scrapePool: string): Promise<TargetsResult> { return this.listTargets(scrapePool); }
- src/prometheus/client.ts:239-246 (helper)Core helper method listTargets that performs the HTTP request to Prometheus /api/v1/targets endpoint with scrapePool parameter if provided.async listTargets(scrapePool?: string): Promise<TargetsResult> { const endpoint = "/api/v1/targets"; const params: Record<string, string> = {}; if (scrapePool) { params.scrapePool = scrapePool; } return this.request<TargetsResult>(endpoint, params); }