How to retrieve Groups Metrics ?
Get Group IRN
The request route to get the groups list is:
GET /groups
It provides a response which lists all groups with individual information:
[
{
"id": "3247aade-d579-48cd-9459-ed818b5a0525",
"createdAt": "2019-03-08T15:23:29.701293Z",
"updatedAt": "2019-03-08T15:23:29.701293Z",
"irn": "irn:group:7b2e43bc4892::oyel09",
"name": "Group",
"description": "k",
"organisationId": "11007c0f-1cea-418c-a7bd-7b2e43bc4892",
"allocatedCapacity": null,
"tagIds": null,
"countConnectors": 1,
"countLinks": 0
}
]
The IRN can be found in the key irn: "irn:group:7b2e43bc4892::oyel09"
Get Group Metrics
The following request list all available metrics for a group:
GET /metrics/query/irn/irn:group:7b2e43bc4892::oyel09
The response is:
[
{
"name": "latin-america",
"type": "timeserie"
},
{
"name": "japan",
"type": "timeserie"
},
{
"name": "south-africa",
"type": "timeserie"
},
{
"name": "southeast-asia",
"type": "timeserie"
},
{
"name": "north-america",
"type": "timeserie"
},
{
"name": "europe",
"type": "timeserie"
},
{
"name": "pacific",
"type": "timeserie"
}
]
Regional Used Capacity
All the metrics available for a group provide the used capacity in a given region. There are currently 7 regions in InterCloud service offer.
Run Group Metrics
The request to run a capacity metric is:
GET /metrics/query/irn/irn:group:1jeqjrcewkrkg::3tznx1/europe/run?start-d=2019-03-11T13:15:47%2B01:00&end-d=2019-03-18T13:15:47%2B01:00
The response is:
{
"type": "timeserie",
"measure": "Capacity",
"axis": {
"non_negative_derivative": {
"unit": "Bytes/s",
"title": ""
}
},
"Results": [
{
"Series": [
{
"name": "interface_snmp",
"columns": [
"time",
"sum"
],
"values": [
[
"1970-01-01T00:00:00Z",
437.8840402443454
]
]
}
],
"Messages": null
}
]
}