POST
/
cloud
/
v1
/
loadbalancers
/
{project_id}
/
{region_id}
/
{loadbalancer_id}
/
metrics
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
load_balancer_metrics_list = client.cloud.load_balancers.metrics.list(
    loadbalancer_id="loadbalancer_id",
    project_id=0,
    region_id=0,
    time_interval=6,
    time_unit="day",
)
print(load_balancer_metrics_list.count)
{
  "count": 1,
  "results": [
    {
      "cpu_util": 8,
      "memory_util": 33.28411162695459,
      "network_Bps_egress": 102,
      "network_Bps_ingress": 102,
      "network_pps_egress": 0.7,
      "network_pps_ingress": 0.7,
      "time": "2020-07-07T12:57:00Z"
    }
  ]
}

Authorizations

APIKey
string
header
required

API key for authentication.

Path Parameters

project_id
integer
required

Project ID

region_id
integer
required

Region ID

loadbalancer_id
string
required

Loadbalancer ID

Body

application/json

Response

200 - application/json

List of loadbalancer metrics

The response is of type object.