grafana_query
Run raw datasource queries on a Grafana instance to fetch metrics or logs over a time range; results are datasource-specific, not normalized.
Instructions
Run a raw query against one datasource on a Grafana instance. The response shape is datasource-specific (Prometheus, Loki, SQL, ...); this is a passthrough, not a normalized result.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | end of the time range: a Grafana relative unit like now, or epoch milliseconds (default: now) | |
| from | No | start of the time range: a Grafana relative unit like now-1h, or epoch milliseconds (default: now-1h) | |
| query | Yes | raw query in the datasource's own language, e.g. a PromQL or LogQL expression | |
| instance | Yes | the inventory grafana instance name | |
| datasource_uid | Yes | UID of the datasource to query (see its dashboard/settings URL) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | ||
| instance | Yes | ||
| timestamp | Yes | ||
| datasource_uid | Yes |