query_metrics
Query metrics and retrieve time-series data using Sumo Logic syntax, with support for aggregation operators like avg, sum, and grouping.
Instructions
Execute a metrics query and return time-series data.
Uses the same query syntax as the Sumo Logic UI. Supports operators like avg, sum, min, max, rate, delta, topk, outlier, predict, and grouping with 'by'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Metrics query string (same syntax as the Sumo UI, e.g. 'metric=CPU_Idle | avg by host') | |
| rollup | No | Aggregation: 'Avg', 'Sum', 'Min', 'Max', 'Count', or '' for default | |
| to_time | No | End time — same formats | now |
| from_time | No | Start time — ISO 8601, relative (-15m, -1h), epoch ms, or 'now' | -15m |
| quantization | No | Quantization interval in ms (0 for auto) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |