query_observation_trends
Retrieve evenly spaced trend buckets for UniFi observation metrics over a UTC time range. Returns explicit gaps for missing intervals, distinguishing absence from zero.
Instructions
Query bounded UTC trend buckets for an observation kind and metric.
Read-only operation. Returns evenly spaced time buckets between start and end with explicit gaps for missing intervals, so callers can distinguish absence from zero. Bucket size defaults to 300 seconds. Use capture_observations_now first if recent data is missing.
Args: kind: Observation category to query (e.g. "health", "client", "device"). metric: Metric name within the kind (e.g. "latency_ms", "cpu_pct"). start: Inclusive UTC start timestamp (ISO-8601). end: Inclusive UTC end timestamp (ISO-8601). bucket_seconds: Width of each trend bucket in seconds. Defaults to 300. source: Optional source filter (e.g. controller type); omit for all sources. controller: Optional controller identifier filter; omit for all controllers. site: Optional site name filter (e.g. "default"); omit for all sites.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | Yes | Inclusive UTC end timestamp (ISO-8601). | |
| kind | Yes | Observation category to query (e.g. "health", "client", "device"). | |
| site | No | Optional site name filter (e.g. "default"); omit for all sites. | |
| start | Yes | Inclusive UTC start timestamp (ISO-8601). | |
| metric | Yes | Metric name within the kind (e.g. "latency_ms", "cpu_pct"). | |
| source | No | Optional source filter (e.g. controller type); omit for all sources. | |
| controller | No | Optional controller identifier filter; omit for all controllers. | |
| bucket_seconds | No | Width of each trend bucket in seconds. Defaults to 300. |