How to retrieve Cloud Virtual Interfaces Metrics ?
Get Cloud Appliance ID
The request route to get the cloud appliance ID:
GET /cloud-appliances
It provides a response which lists all cloud appliances (CPE) with individual information:
[
{
"id": "0344bcae-b37d-4646-a4cc-434400a6f81e",
"createdAt": "2019-03-20T10:20:53.107684Z",
"updatedAt": "2019-03-20T10:20:53.107684Z",
"irn": "irn:cpe:skstok62tbks::1rjn9qx",
"name": "TEST",
"description": "This Cloud Appliance is dedicated to check data consistency after version upgrade",
"tagIds": [
"cde88161-a9a9-46b0-b4ae-4da7a0918b21",
"b81d85e6-59da-4bc5-988e-41dc5eab10ac",
"ac9ea0ad-90d6-4a80-b7f9-948b68c07d4e",
"976119e3-95ac-4a40-901c-63f397ece834"
],
"cloudApplianceModel": {
"id": "725eb82e-0053-40e0-98a7-0558facd4bd3",
"createdAt": "2018-08-20T11:58:34.361307Z",
"updatedAt": "2018-08-20T11:58:34.361307Z",
"modelName": "SRX1500",
"maxCapacity": "Up to 5G",
"connectorsNumber": 0,
"dualPowered": false,
"flowtypes": "",
"vendor": "Juniper",
"type": "Standard",
"uplinkMedia": "10GBase-LR"
},
"cloudApplianceModelID": "725eb82e-0053-40e0-98a7-0558facd4bd3",
...
"cloudVirtualInterfaces": [
{
"id": "5cb99193-af86-496c-b5ab-beba6aa9833b",
"createdAt": "2019-03-20T10:21:40.542528Z",
"updatedAt": "2019-03-20T10:21:40.542528Z",
"cloudApplianceId": "0344bcae-b37d-4646-a4cc-434400a6f81e",
"irn": "irn:cloudgateway:skstok62tbks:entreprise:1rlgnex",
"name": "TEST ",
"tagIds": [
"cde88161-a9a9-46b0-b4ae-4da7a0918b21",
"b81d85e6-59da-4bc5-988e-41dc5eab10ac",
"976119e3-95ac-4a40-901c-63f397ece834",
"ac9ea0ad-90d6-4a80-b7f9-948b68c07d4e"
],
"description": "This Cloud Virtual Interface is dedicated to check data consistency after version upgrade",
"cmeIfDescription": "CST:L3-CONNECTOR-INTERCLOUD-001-CLOUD-SERVICES",
"organisationId": "11007c0f-1cea-418c-a7bd-7b2e43bc4892",
...
Get Cloud Virtual Interface IRN
The IRN of the cloud virtual interfaces are embedded in the previous response:
"cloudVirtualInterfaces": [
{
"id": "5cb99193-af86-496c-b5ab-beba6aa9833b",
"createdAt": "2019-03-20T10:21:40.542528Z",
"updatedAt": "2019-03-20T10:21:40.542528Z",
"cloudApplianceId": "0344bcae-b37d-4646-a4cc-434400a6f81e",
"irn": "irn:cloudgateway:skstok62tbks:entreprise:1rlgnex",
"name": "TEST ",
"tagIds": [
"cde88161-a9a9-46b0-b4ae-4da7a0918b21",
"b81d85e6-59da-4bc5-988e-41dc5eab10ac",
"976119e3-95ac-4a40-901c-63f397ece834",
"ac9ea0ad-90d6-4a80-b7f9-948b68c07d4e"
],
"description": "This Cloud Virtual Interface is dedicated to check data consistency after version upgrade",
"cmeIfDescription": "CST:L3-CONNECTOR-INTERCLOUD-001-CLOUD-SERVICES",
"organisationId": "11007c0f-1cea-418c-a7bd-7b2e43bc4892",
...
Get Cloud Virtual Interface Metrics
The request to list all metrics for a cloud virtual interface is:
GET /metrics/query/irn/irn:cloudgateway:skstok62tbks:entreprise:1rlgnex
The answer is:
[
{
"name": "vgwStatus",
"type": "status"
},
{
"name": "bits_send",
"type": "timeserie"
},
{
"name": "bits_received",
"type": "timeserie"
}
]
bits_send: incoming bandwidthbits_received: outgoing bandwidthvgwStatus: status of the cloud virtual interface
Run Cloud Virtual Interface Metrics
The request to run a bits_send metric, for example, is:
/metrics/query/irn/irn:cloudgateway:skstok62tbks:entreprise:1rlgnex/bits_send/run?start-d=2019-03-20T13:35:06%2B01:00&end-d=2019-03-21T13:35:06%2B01:00
The response is (timeseries metric type):
{
"type": "timeserie",
"measure": "Output Bitrate",
"axis": {
"non_negative_derivative": {
"unit": "bps",
"title": ""
}
},
"Results": [
{
"Series": [
{
"name": "interface_snmp",
"columns": [
"time",
"non_negative_derivative"
],
"values": [
[
"2019-03-20T12:40:00Z",
803.76
],
[
"2019-03-20T12:45:00Z",
826.7733333333333
],
[
"2019-03-20T12:50:00Z",
806.7466666666667
],