grafana_query_metrics
Query Prometheus metrics through Grafana using PromQL expressions to monitor system performance and analyze time-series data.
Instructions
Execute a PromQL expression via a Grafana Prometheus datasource and return the results. Use grafana_list_datasources first to find the datasource UID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| datasource_uid | Yes | The UID of the Prometheus datasource in Grafana. | |
| expr | Yes | The PromQL expression to evaluate. | |
| from | No | Start of the time range, e.g. 'now-1h', 'now-30m'. Defaults to 'now-1h'. | |
| to | No | End of the time range, e.g. 'now'. Defaults to 'now'. | |
| instant | No | If true, returns a single instant value. If false, returns a time series. Defaults to true. |