Skip to content

Get Load Balancer Metric

GET
/gateway/{gateway_id}/metrics/{metric_name}/
curl --request GET \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/gateway/{gateway_id}/metrics/{metric_name}/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>'

Returns the values of one metric over the interval, as two lists of the same length: the times and the values. Use a metric_key from List Load Balancer Metrics as metric_name.

gateway_id
required
integer

Load Balancer ID

metric_name
required
string

Metric key, for example request_count.

project_id
required
integer

Project ID

interval
string
default: 5m
Allowed values: 5m 15m 30m 1h 3h 6h 12h

How far back to look. Default 5m.

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

The metric over time

Media typeapplication/json
object
code
integer
message
string
data
object
time_series

Times in India time (IST), 12-hour with AM or PM: 11:15:30AM for intervals up to 30m, 11:15AM from 1h.

Array<string>
value_series

Values as text with 2 decimals, one per time.

Array<string>
errors
object

Example

{
"code": 200,
"message": "Success",
"data": {
"time_series": [
"11:15:30AM",
"11:15:45AM"
],
"value_series": [
"12.50",
"13.10"
]
},
"errors": {}
}

interval is not one of the allowed values. A missing or invalid project ID also gives 400 with errors “Project ID is missing or invalid”.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 400,
"message": "Bad Request",
"data": {},
"errors": "Invalid interval value"
}

No Load Balancer with that ID in the project and region.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 404,
"message": "Bad Request",
"data": {},
"errors": "Gateway not found"
}

The metric name is not known for this Load Balancer type, or the metrics store could not be reached.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 412,
"message": "Precondition Failed",
"data": {},
"errors": "Monitoring data not available at this moment!"
}