query_metric
Retrieve metric data points via Grail DQL timeseries queries. Specify metric key, aggregation, filter, and time range for observability metrics.
Instructions
Query metric data points via Grail DQL 'timeseries' (Gen3-native, platform token). Builds a timeseries query and executes it against the Grail storage API. Works on all Gen3/Grail tenants with the storage:metrics:read scope.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| metricKey | Yes | Metric key, e.g. 'dt.host.cpu.usage'. | |
| aggregation | No | Aggregation: avg|sum|min|max|count|median|percentile etc. Default 'avg'. | |
| by | No | Dimensions to split by, e.g. ['dt.entity.host']. | |
| filter | No | Optional DQL filter expression, e.g. 'dt.entity.host == "HOST-123"'. | |
| from | No | DQL timeframe start (default 'now()-1h'). | |
| to | No | DQL timeframe end (default 'now()'). | |
| limit | No |