query_prometheus
Execute PromQL queries against Prometheus data sources to retrieve instant metrics or time series data for monitoring and analysis.
Instructions
Query Prometheus using a PromQL expression. Supports both instant and range queries.
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": {
"datasourceUid": "<datasourceUid>",
"expr": "<expr>",
"queryType": "<queryType>",
"startTime": "<startTime>"
},
"name": "query_prometheus"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| datasourceUid | Yes | The UID of the datasource to query | |
| endTime | No | The end time for range queries | |
| expr | Yes | The PromQL expression to query | |
| queryType | Yes | The type of query to use | |
| startTime | Yes | The start time (RFC3339 or relative like "now-1h") | |
| stepSeconds | No | The time series step size in seconds for range queries |