GET /api/monitoring/metrics/timeline
Description
Timeline metrics may be used to graph metric values over time. If real-time monitoring is enabled, the API Server maintains in-memory metrics for 3 timeline periods as follows:-
- the last 10 minutes
- the last 10 hours
- the last 5 days
For each timeline period, 120 data points are maintained. This means:-
- for the 10 minute timeline period, there is a data point every 5 seconds
- for the 10 hour timeline period, there is a data point every 5 minutes
- for the 5 day timeline period, there is a data point every 1 hour.
This means that the data is at its most fine-grained for the shortest timeline period.
It is possible to request the data for any of the timeline periods by passing the related timeline parameter in the query string. For each timeline period exactly 120 data points will be returned unless the from parameter is used.
The Monitoring API resides in the API Servers, therefore this method must be invoked via the Routing API in the Admin Node Manager.
Resource URL
https://localhost:8090/api/router/service/{serviceID}/api/monitoring/metrics/timeline
https://localhost:8090/api/router/service/{serviceID}/api/monitoring/metrics/timeline?metricGroupType={type}&name={name}&metricType={metricType}&from={from}&timeline={timeline}
Parameters
| metricGroupType | optional | The metric group type, e.g. "Service", "Client", "TargetServer". This defaults to SystemOverview. |
| name | optional | The metric group name. If the name is not specified, it sums all of the groups of the metricGroupType together. |
| metricType | optional | The metric type name; multiple names can be specified for additional series. This defaults to successes |
| from | optional | An ISO-8601 standard web date (e.g. 2012-04-11T14:09:50Z) or a reference (e.g. 5minutes) If not specified, it defaults to the full timeline interval. |
| timeline | optional | The time window interval; one of 10m, 10h, 5d This defaults to 10m. |
Response Codes
| Response Code | Description |
|---|---|
| 200 | Success. The response body contains a list of maps of metrics. |
| 404 | Metrics are requested for a metric group that does not currently exist in memory, or, an attempt is made to request an unsupported timeline period. |
Example Request and Response
GET https://localhost:8090/api/router/service/instance-1/api/monitoring/metrics/timeline?metricGroupType=TargetServer
HTTP 1.1 200 OK
{
"result": {
"id": "instance-1",
"name": "Service",
"series": [
{
"name": "successes",
"pointInterval": 5000,
"pointStart": 1355329045000,
"data": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
4,
2,
0,
0,
0,
0,
0,
0,
0,
0
]
}
]
}
}