ves-io-schema-dc_cluster_group-CustomDataAPI-Metrics

Examples of performing dcclustergroup CustomDataAPI Metrics

Usecase:

Perform Metrics on dcclustergroup

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-build970361017_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: Wed, 25 Aug 2021 09:02:54 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"
            }
          ]
        }
      ]
    }
  ]
}