Query Agent Metrics
GET/api/v2/telemetry/metrics
Retrieves collected agent metrics from VictoriaMetrics (or Elasticsearch fallback), filtered by device, topics, metric names and time range. Intended to back metric dashboards in the UI.
Request
Query Parameters
Filter by a single device ID
Filter by one or more topics
Filter by one or more metric names
Start of the time range (ISO 8601). Defaults to 1 hour ago.
End of the time range (ISO 8601). Defaults to now.
Aggregation resolution for the time series (e.g., 30s, 1m, 5m). Default 60s.
Max number of metric points to return
Responses
- 200
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Total number of returned metric points
metrics
object[]
required
Matching metric points ordered by time ascending
Device identifier that generated/forwarded the metric
Topic category of the metric
Metric name (e.g., cpu_usage, memory_usage)
Metric numeric value
Unit of the metric (e.g., percent, bytes, ms)
Timestamp of the sample (ISO 8601)
Additional labels/tags for the metric
{
"total": 0,
"metrics": [
{
"deviceId": "string",
"topic": "string",
"name": "string",
"value": 0,
"unit": "string",
"timestamp": "string",
"labels": {}
}
]
}