query_prometheus
Run PromQL queries against Prometheus in Grafana to retrieve time-series data for monitoring and analysis.
Instructions
Execute a PromQL query against a Prometheus datasource.
Args: connection_name: Name of the Grafana connection datasource_uid: UID of the Prometheus datasource query: PromQL query to execute time_from: Start time (e.g., 'now-1h' or timestamp) time_to: End time (e.g., 'now' or timestamp) step: Query resolution step (e.g., '15s')
Returns: JSON string with query results.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| step | No | ||
| query | Yes | ||
| time_to | No | ||
| time_from | No | ||
| datasource_uid | Yes | ||
| connection_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |