Get a load balancer's metrics

Get a load balancer's connections and traffic over time. Defaults to the last day. A range can be up to 366 days long.

GET https://{availability_zone}.betterstackcloud.com/v1/load-balancers/{id}/metrics
id string required

The ID of the load balancer.

from datetime

The start of the range, in ISO 8601, included in the range. Defaults to one day before to.

to datetime

The end of the range, in ISO 8601, excluded from the range. Defaults to now.

Authorization string required

Bearer $TOKEN

200 OK
{
  "load_balancer_id": "123456789",
  "load_balancer_name": "Example",
  "from": "2026-07-01T12:00:00.000Z",
  "to": "2026-07-01T12:00:00.000Z",
  "resolution": "raw",
  "data": [
    {
      "dt": "2026-07-01T12:00:00.000Z",
      "connections": {
        "open": 1.5,
        "open_max": 1,
        "per_second": 1.5
      },
      "traffic": {
        "bytes_in_per_second": 1,
        "bytes_out_per_second": 1
      }
    }
  ]
}

Returns the history as one object, with the range it covers.

load_balancer_id string

The load balancer's ID.

load_balancer_name string

The load balancer's name.

from datetime

The start of the range the metrics cover. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

to datetime

The end of the range the metrics cover. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

resolution string

How far apart the points are.
Valid values:
raw: One point a minute, for a range up to one day.
hourly: One point an hour, for a longer range.

data array of objects

The metrics, one entry per point.

data[].dt datetime

In ISO 8601 format, such as 2026-07-01T12:00:00Z.

data[].connections object

The connections.

data[].connections.open number

The open.

data[].connections.open_max integer

The open max.

data[].connections.per_second number

The per second.

data[].traffic object

The traffic.

data[].traffic.bytes_in_per_second integer

The bytes in per second.

data[].traffic.bytes_out_per_second integer

The bytes out per second.