get_resource_metrics
Retrieve historical time-series metrics for a resource by metric key. Supply resource ID, keys, hours, and rollup type to get timestamped points for trend analysis and troubleshooting.
Instructions
[READ] Fetch time-series metric statistics for a resource.
Returns a dict keyed by metric key, each mapping to a list of {timestamp_ms, value} points — not an envelope. Use this for history; for a single current score use get_resource_health instead. A key the API has no data for does not appear in the result at all, so check which keys came back before reporting a metric as zero.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hours | No | Number of hours of history to retrieve. Default 1. | |
| target | No | Aria target name from config; default when omitted. | |
| metric_keys | Yes | Metric keys to fetch, e.g. ["cpu|usage_average", "mem|usage_average", "disk|usage_average", "net|usage_average"]. | |
| resource_id | Yes | The resource UUID. | |
| rollup_type | No | Aggregation type: AVG, MAX, MIN, SUM, COUNT, LATEST. Default AVG. | AVG |