arrow-left

All pages
gitbookPowered by GitBook
1 of 11

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Get workload pod CPU/Memory current quota and usage

Get workload pod memory usage trend (Bytes)

Get workload CPU Usage (Cores)

Get total CPU/Memory usage of workloads

Get workload pod CPU usage trend (Core)

Monitoring Workload

Get total CPU/Memory usage of workloadschevron-right
Get workload pod CPU/Memory current quota and usagechevron-right
Get workload pod CPU usage trend (Core)chevron-right
Get workload CPU Usage (Cores)chevron-right
Get workload pod memory usage trend (Bytes)chevron-right
Get workload CPU/Memory total quotachevron-right
Get workload pod network usage trend (bps)chevron-right
Get workload network usage (bps)chevron-right
Get workload pod CPU/Memory current usagechevron-right

Get workload CPU/Memory total quota

Get workload memory usage (Bytes)

Get workload network usage (bps)

Get workload pod network usage trend (bps)

hashtag
Get workload pod CPU/Memory current quota and usage

post

Get the current CPU (cores)/Memory (bytes) requested, limited, and used for pods created by the workload.

Body
Responses
chevron-right
200

OK

*/*
post
/v1/monitoring-workloads/metric/pod-resource/result/current
200

OK

hashtag
Get total CPU/Memory usage of workloads

post

Get the current total requested, limited, and used CPU (cores)/Memory (bytes) for the workload.

Body
Responses
chevron-right
200

OK

*/*
post
/v1/monitoring-workloads/metric/resource/result/current
200

OK

hashtag
Get workload CPU Usage (Cores)

get

Get the CPU usage of the workload.

Query parameters
clusterIdsstringRequired
namespacesstringRequired
workloadIdsstringRequired
Responses
chevron-right
200

OK

*/*
get
/v1/monitoring-workloads/metric/cpu/result/current
200

OK

hashtag
Get workload pod CPU usage trend (Core)

get

Get the per-minute trend of CPU usage for pods created by the workload.

Query parameters
clusterIdsstringRequired
namespacesstringRequired
workloadIdsstringRequired
startstringRequired
endstringRequired
Responses
chevron-right
200

OK

*/*
get
/v1/monitoring-workloads/metric/pod-cpu/result/transition
200

OK

Get workload pod CPU/Memory current usage

hashtag
Get workload pod memory usage trend (Bytes)

get

Get the Memory usage trend per minute of the pods created by the workload.

Query parameters
clusterIdsstringRequired
namespacesstringRequired
workloadIdsstringRequired
startstringRequired
endstringRequired
Responses
chevron-right
200

OK

*/*
get
/v1/monitoring-workloads/metric/pod-memory/result/transition
200

OK

POST /v1/monitoring-workloads/metric/pod-resource/result/current HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 123

{
  "clusters": [
    {
      "name": "thingcluster",
      "namespaces": [
        {
          "name": "cocktail-system",
          "workloads": [
            {
              "name": "cocktail-api-cmdb"
            }
          ]
        }
      ]
    }
  ]
}
{
  "thingcluster": {
    "cocktail-system": {
      "cocktail-api-cmdb": {
        "cocktail-api-cmdb-0": {
          "limit_cpu": 1000,
          "limit_memory": 2147483648,
          "request_cpu": 500,
          "request_memory": 1073741824,
          "usage_cpu": 4,
          "usage_memory": 1672011776
        },
        "limit_cpu": 1000,
        "limit_memory": 2147483648,
        "request_cpu": 500,
        "request_memory": 1073741824,
        "usage_cpu": 4,
        "usage_memory": 1672011776
      },
      "limit_cpu": 1000,
      "limit_memory": 2147483648,
      "request_cpu": 500,
      "request_memory": 1073741824,
      "usage_cpu": 4,
      "usage_memory": 1672011776
    },
    "limit_cpu": 1000,
    "limit_memory": 2147483648,
    "request_cpu": 500,
    "request_memory": 1073741824,
    "usage_cpu": 4,
    "usage_memory": 1672011776
  }
}
POST /v1/monitoring-workloads/metric/resource/result/current HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 80

{
  "clusters": [
    {
      "name": "thingcluster",
      "namespaces": [
        {
          "name": "cocktail-system"
        }
      ]
    }
  ]
}
{
  "thingcluster": {
    "cocktail-system": {
      "cocktail-api-cmdb": {
        "limit_cpu": 1000,
        "limit_memory": 2147483648,
        "request_cpu": 500,
        "request_memory": 1073741824,
        "usage_cpu": 4,
        "usage_memory": 1679163392
      },
      "limit_cpu": 23300,
      "limit_memory": 37694210048,
      "request_cpu": 9400,
      "request_memory": 16131293184,
      "usage_cpu": 211,
      "usage_memory": 7336022016
    },
    "limit_cpu": 23300,
    "limit_memory": 37694210048,
    "request_cpu": 9400,
    "request_memory": 16131293184,
    "usage_cpu": 211,
    "usage_memory": 7336022016
  }
}
GET /v1/monitoring-workloads/metric/cpu/result/current?clusterIds=text&namespaces=text&workloadIds=text HTTP/1.1
Accept: */*
[
  {
    "metrics": {
      "cluster": "thingcluster",
      "measure": "usage-cpu",
      "namespace": "cocktail-system",
      "workload": "cocktail-api-cmdb"
    },
    "timestamp": 1688001180,
    "value": 0.0030703215323597726
  }
]
GET /v1/monitoring-workloads/metric/pod-cpu/result/transition?clusterIds=text&namespaces=text&workloadIds=text&start=text&end=text HTTP/1.1
Accept: */*
[
  {
    "metrics": {
      "cluster": "thingcluster",
      "measure": "usage-cpu",
      "namespace": "cocktail-system",
      "node": "apps-gpu-v100",
      "pod": "cocktail-api-cmdb-0",
      "workload": "cocktail-api-cmdb"
    },
    "samples": [
      0.0033,
      0.00334,
      0.00577
    ],
    "timestamps": [
      1687741080,
      1687741140,
      1687741200
    ],
    "values": null
  }
]
GET /v1/monitoring-workloads/metric/pod-memory/result/transition?clusterIds=text&namespaces=text&workloadIds=text&start=text&end=text HTTP/1.1
Accept: */*
[
  {
    "metrics": {
      "cluster": "thingcluster",
      "measure": "usage-memory",
      "namespace": "cocktail-system",
      "node": "apps-gpu-v100",
      "pod": "cocktail-api-cmdb-0",
      "workload": "cocktail-api-cmdb"
    },
    "samples": [
      1508339712,
      1508360192,
      1508970496
    ],
    "timestamps": [
      1687741080,
      1687741140,
      1687741200
    ],
    "values": null
  }
]

hashtag
Get workload CPU/Memory total quota

get

Get the total requested and limit amounts of CPU (Core) and Memory (Byte) allocated to pods deployed by the workload.

Query parameters
clusterIdsstringRequired
namespacesstringRequired
workloadIdsstringRequired
Responses
chevron-right
200

OK

*/*
get
/v1/monitoring-workloads/metric/quota/result/current
200

OK

hashtag
Get workload memory usage (Bytes)

get

Get the Memory usage of the workload.

Query parameters
clusterIdsstringRequired
namespacesstringRequired
workloadIdsstringRequired
Responses
chevron-right
200

OK

*/*
get
/v1/monitoring-workloads/metric/memory/result/current
200

OK

hashtag
Get workload pod network usage trend (bps)

get

Get the per-minute trend of Network usage, categorized by inbound and outbound, for pods created by the workload.

Query parameters
clusterIdsstringRequired
namespacesstringRequired
workloadIdsstringRequired
startstringRequired
endstringRequired
Responses
chevron-right
200

OK

*/*
get
/v1/monitoring-workloads/metric/pod-network/result/transition
200

OK

hashtag
Get workload network usage (bps)

get

Get the Network usage, categorized by inbound and outbound, for the workload.

Query parameters
clusterIdsstringRequired
namespacesstringRequired
workloadIdsstringRequired
Responses
chevron-right
200

OK

*/*
get
/v1/monitoring-workloads/metric/network/result/current
200

OK

hashtag
Get workload pod CPU/Memory current usage

get

Get the current CPU (Core) and Memory (Byte) usage of pods created by the workload.

Query parameters
clusterIdsstringRequired
namespacesstringRequired
workloadIdsstringRequired
Responses
chevron-right
200

OK

*/*
get
/v1/monitoring-workloads/metric/pod-usage/result/current
200

OK

GET /v1/monitoring-workloads/metric/pod-usage/result/current?clusterIds=text&namespaces=text&workloadIds=text HTTP/1.1
Accept: */*
[
  {
    "metrics": {
      "cluster": "thingcluster",
      "measure": "usage-cpu",
      "namespace": "cocktail-system",
      "node": "apps-gpu-v100",
      "pod": "cocktail-api-cmdb-0",
      "workload": "cocktail-api-cmdb"
    },
    "timestamp": 1688004480,
    "value": 0.004003636393767266
  },
  {
    "metrics": {
      "cluster": "thingcluster",
      "measure": "usage-memory",
      "namespace": "cocktail-system",
      "node": "apps-gpu-v100",
      "pod": "cocktail-api-cmdb-0",
      "workload": "cocktail-api-cmdb"
    },
    "timestamp": 1688004480,
    "value": 1673150464
  }
]
GET /v1/monitoring-workloads/metric/quota/result/current?clusterIds=text&namespaces=text&workloadIds=text HTTP/1.1
Accept: */*
[
  {
    "metrics": {
      "cluster": "thingcluster",
      "measure": "limit-cpu",
      "namespace": "cocktail-system",
      "workload": "cocktail-api-cmdb"
    },
    "timestamp": 1688004660,
    "value": 1
  },
  {
    "metrics": {
      "cluster": "thingcluster",
      "measure": "limit-memory",
      "namespace": "cocktail-system",
      "workload": "cocktail-api-cmdb"
    },
    "timestamp": 1688004660,
    "value": 2147483648
  },
  {
    "metrics": {
      "cluster": "thingcluster",
      "measure": "request-cpu",
      "namespace": "cocktail-system",
      "workload": "cocktail-api-cmdb"
    },
    "timestamp": 1688004660,
    "value": 0.5
  },
  {
    "metrics": {
      "cluster": "thingcluster",
      "measure": "request-memory",
      "namespace": "cocktail-system",
      "workload": "cocktail-api-cmdb"
    },
    "timestamp": 1688004660,
    "value": 1073741824
  }
]
GET /v1/monitoring-workloads/metric/memory/result/current?clusterIds=text&namespaces=text&workloadIds=text HTTP/1.1
Accept: */*
[
  {
    "metrics": {
      "cluster": "thingcluster",
      "measure": "usage-memory",
      "namespace": "cocktail-system",
      "workload": "cocktail-api-cmdb"
    },
    "timestamp": 1688001360,
    "value": 1645985792
  }
]
GET /v1/monitoring-workloads/metric/pod-network/result/transition?clusterIds=text&namespaces=text&workloadIds=text&start=text&end=text HTTP/1.1
Accept: */*
[
  {
    "metrics": {
      "cluster": "thingcluster",
      "measure": "inbound",
      "namespace": "cocktail-system",
      "node": "apps-gpu-v100",
      "pod": "cocktail-api-cmdb-0",
      "workload": "cocktail-api-cmdb"
    },
    "samples": [
      677.91329,
      450.96245,
      10778.04853
    ],
    "timestamps": [
      1687741080,
      1687741140,
      1687741200
    ],
    "values": null
  }
]
GET /v1/monitoring-workloads/metric/network/result/current?clusterIds=text&namespaces=text&workloadIds=text HTTP/1.1
Accept: */*
[
  {
    "metrics": {
      "cluster": "thingcluster",
      "measure": "inbound",
      "namespace": "cocktail-system",
      "workload": "cocktail-api-cmdb"
    },
    "timestamp": 1688001420,
    "value": 595.1208098322701
  },
  {
    "metrics": {
      "cluster": "thingcluster",
      "measure": "outbound",
      "namespace": "cocktail-system",
      "workload": "cocktail-api-cmdb"
    },
    "timestamp": 1688001420,
    "value": 2675.7099578828106
  }
]