query_metrics
Run PromQL queries on OpenObserve metrics over a time range, specifying start and end times with optional step resolution to analyze metric trends.
Instructions
Query metrics with PromQL over a time range (Prometheus query_range)
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": {
"query": "<query>",
"start_time": "<start_time>"
},
"name": "query_metrics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| step | No | Resolution step | 60s |
| query | Yes | PromQL expression | |
| end_time | No | ISO timestamp. Defaults to now. | |
| start_time | Yes | ISO timestamp, or relative shorthand like '15m', '2h', '7d' |