query_metrics
Execute PromQL queries on Amazon Managed Prometheus workspaces to retrieve metrics and analyze performance. Specify workspace ID, query string, and optional time ranges for targeted insights.
Instructions
Execute a PromQL query against an Amazon Managed Prometheus workspace.
Args: workspace_id: The ID of the workspace to query query: PromQL query string region: AWS region where the workspace is located (default: us-east-1) start_time: Start time for range queries (RFC3339 format) end_time: End time for range queries (RFC3339 format) step: Query resolution step for range queries (e.g., "15s", "1m")
Returns: JSON string containing query results or preparation details
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"workspace_id": "<workspace_id>",
"query": "<query>"
},
"name": "query_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_time | No | ||
| query | Yes | ||
| region | No | us-east-1 | |
| start_time | No | ||
| step | No | ||
| workspace_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |