ves-io-schema-dc_cluster_group-CustomDataAPI-Metrics
Examples of performing dc_cluster_group CustomDataAPI Metrics
Usecase:
Perform Metrics on dc_cluster_group
Request:
Request using vesctl:
vesctl request rpc dc_cluster_group.CustomDataAPI.Metrics -i request.yaml --uri /public/namespaces/namespace-literal/dc_cluster_groups/metrics --http-method POST
where file request.yaml has following contents:
{}
vesctl yaml response:
data:
- data:
- key:
DC_CLUSTER_GROUP: dc-cluster-group-1
DST_SITE: site-2
SRC_SITE: site-1
value:
- timestamp: 1593622800
value: "1024"
- key:
DC_CLUSTER_GROUP: dc-cluster-group-1
DST_SITE: site-3
SRC_SITE: site-1
value:
- timestamp: 1593622800
value: "1024"
- data:
- key:
DC_CLUSTER_GROUP: dc-cluster-group-1
DST_SITE: site-2
SRC_SITE: site-1
value:
- timestamp: 1593622800
value: "10"
- key:
DC_CLUSTER_GROUP: dc-cluster-group-1
DST_SITE: site-3
SRC_SITE: site-1
value:
- timestamp: 1593622800
value: "100"
type: TX_THROUGHPUT_PACKETS
Request using curl:
curl -X 'POST' -d '{}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_tmp_go-build1372770011_b001_apidocs.test/host=docker-desktop' 'https://acmecorp.console.ves.volterra.io/api/data/namespaces/namespace-literal/dc_cluster_groups/metrics'
curl response:
HTTP/1.1 200 OK
Content-Length: 1379
Content-Type: application/json
Date: Thu, 28 Jul 2022 12:09:56 GMT
Vary: Accept-Encoding
{
"data": [
{
"type": "TX_THROUGHPUT_BYTES",
"data": [
{
"key": {
"DC_CLUSTER_GROUP": "dc-cluster-group-1",
"DST_SITE": "site-2",
"SRC_SITE": "site-1"
},
"value": [
{
"timestamp": 1593622800,
"value": "1024"
}
]
},
{
"key": {
"DC_CLUSTER_GROUP": "dc-cluster-group-1",
"DST_SITE": "site-3",
"SRC_SITE": "site-1"
},
"value": [
{
"timestamp": 1593622800,
"value": "1024"
}
]
}
]
},
{
"type": "TX_THROUGHPUT_PACKETS",
"data": [
{
"key": {
"DC_CLUSTER_GROUP": "dc-cluster-group-1",
"DST_SITE": "site-2",
"SRC_SITE": "site-1"
},
"value": [
{
"timestamp": 1593622800,
"value": "10"
}
]
},
{
"key": {
"DC_CLUSTER_GROUP": "dc-cluster-group-1",
"DST_SITE": "site-3",
"SRC_SITE": "site-1"
},
"value": [
{
"timestamp": 1593622800,
"value": "100"
}
]
}
]
}
]
}