prometheus_query
Execute PromQL queries to retrieve and analyze cluster metrics from Prometheus, supporting instant and range queries with automatic endpoint discovery.
Instructions
Execute PromQL queries against Prometheus for cluster metrics.
Supports instant and range queries with automatic endpoint discovery and authentication.
Args:
query: PromQL query string.
query_type: "instant" or "range" (default: "instant").
start_time: Start for range queries (ISO 8601 or Unix timestamp).
end_time: End for range queries (ISO 8601 or Unix timestamp).
step: Step interval for range queries (default: "300s").
cluster: Cluster domain override.
format: "json", "table", or "csv" (default: "json").
namespace_filter: Regex to filter by namespace.
limit: Max results to return.
timeout: Query timeout in seconds (default: 30).
Returns:
Dict: Query results, metadata, execution info, and analysis.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| query_type | No | instant | |
| start_time | No | ||
| end_time | No | ||
| step | No | 300s | |
| cluster | No | ||
| format | No | json | |
| namespace_filter | No | ||
| limit | No | ||
| timeout | No |