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.
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 |
Input Schema (JSON Schema)
{
"properties": {
"datasourceUid": {
"description": "The UID of the datasource to query",
"type": "string"
},
"endTime": {
"description": "The end time for range queries",
"type": "string"
},
"expr": {
"description": "The PromQL expression to query",
"type": "string"
},
"queryType": {
"description": "The type of query to use",
"enum": [
"range",
"instant"
],
"type": "string"
},
"startTime": {
"description": "The start time (RFC3339 or relative like \"now-1h\")",
"type": "string"
},
"stepSeconds": {
"description": "The time series step size in seconds for range queries",
"type": "number"
}
},
"required": [
"datasourceUid",
"expr",
"queryType",
"startTime"
],
"type": "object"
}