Get Metrics for a LoadBalancer
You must specify the type of metric to get: open_connections, connections_per_second, requests_per_second or bandwidth. You can also specify more than one type by comma separation, e.g. requests_per_second,bandwidth.
Depending on the type you will get different time series data:
| Type | Timeseries | Unit | Description |
|---|---|---|---|
| open_connections | open_connections | number | Open connections |
| connections_per_second | connections_per_second | connections/s | Connections per second |
| requests_per_second | requests_per_second | requests/s | Requests per second |
| bandwidth | bandwidth.in | bytes/s | Ingress bandwidth |
| bandwidth.out | bytes/s | Egress bandwidth |
Metrics are available for the last 30 days only.
If you do not provide the step argument we will automatically adjust it so that 200 samples are returned.
We limit the number of samples to a maximum of 500 and will adjust the step parameter accordingly.
Request
- Base URL: https://api.hetzner.cloud/v1
- URL: https://api.hetzner.cloud/v1/load_balancers/{id}/metrics
- Auth: HTTP bearer
Path parameters
ID of the Load Balancer.
ID of the Load Balancer.
Query parameters
Type of metrics to get.
Start of period to get Metrics for (must be in RFC3339 format).
End of period to get Metrics for (must be in RFC3339 format).
Resolution of results in seconds.
Response
Request succeeded.
Example response
{
"metrics": {
"start": "2017-01-01T00:00:00Z",
"end": "2017-01-01T23:00:00Z",
"step": 60,
"time_series": {
"name_of_timeseries": {
"values": [
[
1435781470.622,
"42"
],
[
1435781471.622,
"43"
]
]
}
}
}
}Changes
No recorded changes to this operation across all 1 revision of this API.