Skip to content

Historical Monitoring Data

GET
/api/v1/appliances/load-balancers/{lb_id}/historical_data/
curl --request GET \
--url 'https://api.e2enetworks.com/myaccount/api/v1/appliances/load-balancers/{lb_id}/historical_data/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \
--header 'Authorization: Bearer <API_TOKEN>'

Returns historical (time-series) HAProxy metrics for a load balancer, sourced from Prometheus. The metric is selected by the metric_name query parameter and the look-back window by interval (in seconds). Frontend metrics return data for the load balancer’s frontend; backend metrics return data for the backend named by the server parameter.

The HTTP response-code metrics (haproxy_backend_http_responses_total, haproxy_frontend_http_responses_total) return the current value bucketed by response class - labels is ["2xx","3xx","4xx","5xx"] and results holds the matching counts. All other metrics return a range series over interval. See metric_name for the full list of metrics the console requests.

lb_id
required
integer

The id of the load balancer, as returned by the List Load Balancers endpoint.

Example

12345
metric_name
string

Name of the HAProxy/Prometheus metric to fetch. The backend does not restrict this to a fixed enum (any metric the HAProxy exporter publishes will work), but the console requests the specific frontend and backend metrics listed below. Defaults to haproxy_backend_http_responses_total.

Example

haproxy_backend_http_responses_total
interval
integer

Look-back window in seconds for the time-series query. Defaults to 3600 (1 hour).

Example

3600
server
string

Name of the backend to scope backend metrics to. Defaults to the load balancer’s first backend.

Example

backend-group-1
project_id
required
integer

Identifier of the project to scope the request to. Required integer project ID.

Example

<PROJECT_ID>
apikey
required
string

API key used to authenticate the request

Example

<API_KEY>
location
required
string

Region of the load balancer.

Example

<LOCATION>

Successful response

Media typeapplication/json

For the HTTP response-code metrics, labels holds the response classes and results the matching counts. For range metrics, labels holds timestamps and results the per-timestamp values.

object
code
integer
data
object
labels

Series labels (response classes for response-code metrics, timestamps for range metrics).

Array<string>
results

Series values aligned with labels.

Array<string>
errors
object
message
string

Example

{
"code": 200,
"data": {
"labels": [
"2xx",
"3xx",
"4xx",
"5xx"
],
"results": [
"0",
"0",
"0",
"2"
]
},
"message": "Success"
}