get_resource_metrics
Fetches time-series metric statistics for a resource, returning raw points or per-metric summaries and explicitly flagging missing keys instead of reporting zero.
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, p95, 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. Over days or weeks, set interval_type="DAYS" (or "HOURS"): the default is one point per 5 minutes, about 8,600 per key for a month. Each point is rollup_type over its span, so with AVG the summary max is the highest daily average, not the peak: use rollup_type="MAX" for peaks. p95 is likewise over the returned points (with DAYS it is the p95 of daily values) and null, with p95_unavailable, below 20 points. interval in the result gives the resolution requested and, in applied, the one Aria reports it used. For a single current score use get_resource_health instead.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"resource_id": "<resource_id>",
"metric_keys": "<metric_keys>"
},
"name": "get_resource_metrics"
}
}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 |
| interval_type | No | Span each point covers: MINUTES, HOURS, DAYS, WEEKS or MONTHS. Default MINUTES. Each point is rollup_type over the span, so DAYS with AVG gives daily averages. | MINUTES |
| interval_quantity | No | Number of interval_type units per point, at least 1. Default 5 (with MINUTES: Aria's 5-minute collection). |