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:

          fieldSelector:
- TX_THROUGHPUT_BYTES

        

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 '{"field_selector":["TX_THROUGHPUT_BYTES"]}' -H 'Content-Type: application/json' -H 'X-Volterra-Useragent: v1/pgm=_var_folders_2__8qnt6fwd5dvglr1xqq6l8b7w0000gp_T_go-build3109416560_b001_apidocs.test/host=C02FN35BMD6R/svc=S:examplesvc/site=mytestce01' 'https://acmecorp.console.ves.volterra.io/api/data/namespaces/namespace-literal/dc_cluster_groups/metrics'
        

curl response:

          HTTP/1.1 200 OK
Content-Type: application/json
Date: Thu, 21 Mar 2024 14:05:04 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",
              "trend_value": null
            }
          ]
        },
        {
          "key": {
            "DC_CLUSTER_GROUP": "dc-cluster-group-1",
            "DST_SITE": "site-3",
            "SRC_SITE": "site-1"
          },
          "value": [
            {
              "timestamp": 1593622800,
              "value": "1024",
              "trend_value": null
            }
          ]
        }
      ]
    },
    {
      "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",
              "trend_value": null
            }
          ]
        },
        {
          "key": {
            "DC_CLUSTER_GROUP": "dc-cluster-group-1",
            "DST_SITE": "site-3",
            "SRC_SITE": "site-1"
          },
          "value": [
            {
              "timestamp": 1593622800,
              "value": "100",
              "trend_value": null
            }
          ]
        }
      ]
    }
  ],
  "step": ""
}