get_resource_metrics
Fetch time-series metric statistics for a resource, returning raw data points or summary statistics. Identify missing metrics with suggested similar keys.
Instructions
[READ] Fetch time-series metric statistics for a resource.
Returns mode ("raw" or "summary"), then metrics (raw: metric key -> list of {timestamp_ms, value} points, only keys with points) or summary (summary=True: per key n, min, max, avg, latest, first/latest timestamps, change_count and change_points — {timestamp_ms, from, to} where the value changed, at most 50, most recent kept), and missing (one entry per requested key with no points: not_collected_for_resource with similar_keys to try, no_data_in_window, resource_reports_no_stat_keys, or undetermined). Never report a missing key as zero. Prefer summary=True for windows over a few hours. For a single current score use get_resource_health instead.
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. | |
| summary | No | Return per-metric summaries instead of every point. Default False. | |
| 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 |