Update docs

Add id's to examples.
Add description of merge_metrics flag.

Change-Id: I350f39ac531ff67ad80c8ae23a07ba1daa84b930
This commit is contained in:
Deklan Dieterly
2015-03-25 09:25:19 -06:00
parent c97edbc446
commit ac053fa650

View File

@@ -29,7 +29,7 @@ Document Version: v2.0
- [Paging](#paging)
- [Offset](#offset)
- [Limit](#limit)
- [JSON RESULTS](#json-results)
- [JSON Results](#json-results)
- [Versions](#versions)
- [List Versions](#list-versions)
- [GET](#get)
@@ -984,12 +984,14 @@ Returns a JSON object with a 'links' array of links and an 'elements' array of m
],
"elements": [
{
"id": 0,
"name": "name1",
"dimensions": {
"key1": "value1"
}
},
{
"id": 1,
"name": "name2",
"dimensions": {
"key1": "value1"
@@ -1006,6 +1008,10 @@ Operations for accessing measurements of metrics.
## List measurements
Get measurements for metrics.
Metrics must be fully qualified with name and dimensions so that only measurements are returned for a single metric. If the metric name and dimensions given do not resolve to a single metric, an error will be displayed asking the user to futher qualify the metric with a name and additional dimensions.
If users do not wish to see measurements for a single metric, but would prefer to have measurements from multiple metrics combined, a 'merge_metrics' flag can be specified. when 'merge_metrics' is set to true (**merge_metrics=true**), all meaurements for all metrics that satisfy the query parameters will be merged into a single list of measurements.
### GET /v2.0/metrics/measurements
#### Headers
@@ -1022,13 +1028,14 @@ None.
* end_time (string, optional) - The end time in ISO 8601 combined date and time format in UTC.
* offset (timestamp, optional)
* limit (integer, optional)
* merge_metrics (boolean, optional) - allow multiple metrics to be combined into a single list of measurements.
#### Request Body
None.
#### Request Examples
```
GET /v2.0/metrics/measurements?name=cpu.system_perc&dimensions=hostname:devstack&start_time=2014-07-18T03:00:00Z HTTP/1.1
GET /v2.0/metrics/measurements?name=cpu.system_perc&dimensions=hostname:devstack&start_time=2015-03-00T00:00:01Z HTTP/1.1
Host: 192.168.10.4:8080
Content-Type: application/json
X-Auth-Token: 2b8882ba2ec44295bf300aecb2caa4f7
@@ -1053,16 +1060,16 @@ Returns a JSON object with a 'links' array of links and an 'elements' array of m
"links": [
{
"rel": "self",
"href": "http://192.168.10.4:8080/v2.0/metrics/measurements?start_time=2014-07-18T03%3A00%3A00Z&name=cpu.system_perc&dimensions=hostname%3Adevstack"
"href": "http://192.168.10.4:8080/v2.0/metrics/measurements?start_time=2015-03-00T00%3A00%3A00Z&name=cpu.system_perc&dimensions=hostname%3Adevstack"
},
{
"rel": "next",
"href": "http://192.168.10.4:8080/v2.0/metrics/measurements?offset=2015-03-03T05%3A21%3A55Z&name=cpu.system_perc&dimensions=hostname%3Adevstack&start_time=2014-07-18T03%3A00%3A00Z"
"href": "http://192.168.10.4:8080/v2.0/metrics/measurements?offset=2015-03-03T05%3A24%3A55Z&name=cpu.system_perc&dimensions=hostname%3Adevstack&start_time=2015-03-00T00%3A00%3A00Z"
}
],
"elements": [
{
"id": "1425359919000",
"id": "2015-03-03T05:24:55Z",
"name": "http_status",
"dimensions": {
"url": "http://localhost:8774/v2.0",
@@ -1077,20 +1084,20 @@ Returns a JSON object with a 'links' array of links and an 'elements' array of m
],
"measurements": [
[
13432920001,
"2015-03-03T05:22:28Z",
"2015-03-03T05:22:28Z",
0,
{}
],
[
13430420001,
"2015-03-03T05:22:12Z",
"2015-03-03T05:23:12Z,
"2015-03-03T05:23:12Z",
0,
{}
],
[
13427670001,
"2015-03-03T05:21:55Z",
"2015-03-03T05:24:55Z",
"2015-03-03T05:24:55Z",
1,
{
"rc": "404",
@@ -1107,6 +1114,10 @@ ___
# Statistics
Operations for calculating statistics of metrics.
Metrics must be fully qualified with name and dimensions so that only statistics are returned for a single metric. If the metric name and dimensions given do not resolve to a single metric, an error will be displayed asking the user to futher qualify the metric with a name and additional dimensions.
If users do not wish to see statistics for a single metric, but would prefer to have statistics from multiple metrics combined, a 'merge_metrics' flag can be specified. when 'merge_metrics' is set to true (**merge_metrics=true**), all statistics for all metrics that satisfy the query parameters will be merged into a single list of statistics.
## List statistics
Get statistics for metrics.
@@ -1128,6 +1139,7 @@ None.
* period (integer, optional) - The time period to aggregate measurements by. Default is 300 seconds.
* offset (timestamp, optional)
* limit (integer, optional)
* merge_metrics (boolean, optional) - allow multiple metrics to be combined into a single list of statistics.
#### Request Body
None.
@@ -1169,6 +1181,7 @@ Returns a JSON object with a 'links' array of links and an 'elements' array of s
],
"elements": [
{
"id": "2014-07-18T03:22:00Z",
"name": "cpu.system_perc",
"dimensions": {
"hostname": "devstack"
@@ -2671,7 +2684,7 @@ Returns a JSON object with a 'links' array of links and an 'elements' array of a
},
{
"rel": "next",
"href": "http://192.168.10.4:8080/v2.0/alarms/37d1ddf0-d7e3-4fc0-979b-25ac3779d9e0/state-history?offset=1424451367001"
"href": "http://192.168.10.4:8080/v2.0/alarms/37d1ddf0-d7e3-4fc0-979b-25ac3779d9e0/state-history?offset=1424452147006"
}
],
"elements": [
@@ -2713,7 +2726,7 @@ Returns a JSON object with a 'links' array of links and an 'elements' array of a
]
},
{
"id": "1424451727002",
"id": "1424452147004",
"alarm_id": "37d1ddf0-d7e3-4fc0-979b-25ac3779d9e0",
"metrics": [
{
@@ -2750,7 +2763,7 @@ Returns a JSON object with a 'links' array of links and an 'elements' array of a
]
},
{
"id": "1424451367001",
"id": "1424452147005",
"alarm_id": "37d1ddf0-d7e3-4fc0-979b-25ac3779d9e0",
"metrics": [
{
@@ -2787,7 +2800,7 @@ Returns a JSON object with a 'links' array of links and an 'elements' array of a
]
},
{
"id": "1424444550000",
"id": "1424452147006",
"alarm_id": "37d1ddf0-d7e3-4fc0-979b-25ac3779d9e0",
"metrics": [
{