Returns metric values sampled for a line chart: original samples when they are few enough, otherwise values aggregated per minute or per bucket.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Returns metric values ready to be plotted on a line chart. This is the same data used by the Things5 web app charts (Monitoring) and by the Grafana datasource, so the three always show the same values for the same time range.
How the resolution is chosen
The resolution is selected automatically for each metric from the requested time range and from how many samples the device sent:
| Condition | resolution | Points |
|---|---|---|
| Range ≤ 30 minutes | raw | Original samples sent by the device |
| At most 1000 samples in the range | raw | Original samples sent by the device |
| At most 1000 minutes with data in the range | minute | One point per minute (bucket_seconds = 60) |
| Otherwise | bucket | One point per bucket of range / 400 minutes (bucket_seconds gives the size) |
When the points are aggregated (minute or bucket), each value is computed with the aggregate function over the bucket: avg (default, weighted on the number of samples), min, max or sum. With raw resolution the original values are returned and aggregate has no effect.
Gaps
With show_gaps=true (default) aggregated series contain a point with value: null for each bucket without data, so a chart can draw a gap instead of joining distant points. Use show_gaps=false to receive only buckets with data.
Limits
At most 50 metric_names[] per request. To read more metrics, split them over several requests.
To read the per-minute processed values (first, last, min, max, avg, sum, sample count) with pagination use Metrics read.
