Endurance

Statistics history

Get historical statistics for a Layer 7 backend

GET /{applianceId}/haproxy/stats/backends/{id}/history

Get a Backend Group’s historical stats

Path parameters
applianceId string Required

The node to read from. Historical data is node-local.

id string Required

The Backend Group id

Query parameters
start integer Required

Window start, a unix timestamp in seconds

end integer Required

Window end, a unix timestamp in seconds

resolution integer

Preferred seconds per data point; the response reports what was served

consolidation default: "average" average | minimum | maximum

Which summary of a coarsened bucket to read. At coarse resolutions an average hides peaks.

metrics string

Comma-separated metric filter; omit for all four

curl
curl -X GET "https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/backends/{id}/history" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/backends/{id}/history';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/backends/{id}/history", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/backends/{id}/history', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "HAProxy Backend History",
  "data": []
}

Get historical statistics for a Layer 7 frontend

GET /{applianceId}/haproxy/stats/frontends/{id}/history

Get a Frontend’s historical stats

Path parameters
applianceId string Required

The node to read from. Historical data is node-local.

id string Required

The Frontend id

Query parameters
start integer Required

Window start, a unix timestamp in seconds

end integer Required

Window end, a unix timestamp in seconds

resolution integer

Preferred seconds per data point. The response reports the resolution actually served, which is the nearest recorded one and may be finer or coarser than this; a window too old for a fine archive is served coarser regardless. Omit for the finest available.

consolidation default: "average" average | minimum | maximum

Which summary of a coarsened bucket to read. At coarse resolutions an average hides peaks.

metrics string

Comma-separated metric filter; omit for all four

curl
curl -X GET "https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/frontends/{id}/history" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/frontends/{id}/history';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/frontends/{id}/history", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/frontends/{id}/history', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "HAProxy Frontend History",
  "data": []
}

Get historical statistics for every real server of a Layer 7 backend

GET /{applianceId}/haproxy/stats/rips/backend/{id}/history

One call for a whole service graph, rather than one per RIP.

Path parameters
applianceId string Required

The node to read from. Historical data is node-local.

id string Required

The Backend Group id whose RIPs to read

Query parameters
start integer Required

Window start, a unix timestamp in seconds

end integer Required

Window end, a unix timestamp in seconds

resolution integer

Preferred seconds per data point; the response reports what was served

consolidation default: "average" average | minimum | maximum

Which summary of a coarsened bucket to read. At coarse resolutions an average hides peaks.

metrics string

Comma-separated metric filter; omit for all four

curl
curl -X GET "https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/rips/backend/{id}/history" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/rips/backend/{id}/history';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/rips/backend/{id}/history", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/rips/backend/{id}/history', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "HAProxy Backend RIPs History",
  "data": []
}

Get historical statistics for a Layer 7 real server

GET /{applianceId}/haproxy/stats/rips/{id}/history

An array, one entry per Backend Group the RIP belongs to. A RIP behind two Backend Groups has two independent sets of counters, because HAProxy reports a row per backend and server pair. A RIP in no Backend Group returns an empty array: it exists but is not in service.

Path parameters
applianceId string Required

The node to read from. Historical data is node-local.

id string Required

The RIP id

Query parameters
start integer Required

Window start, a unix timestamp in seconds

end integer Required

Window end, a unix timestamp in seconds

resolution integer

Preferred seconds per data point; the response reports what was served

consolidation default: "average" average | minimum | maximum

Which summary of a coarsened bucket to read. At coarse resolutions an average hides peaks.

metrics string

Comma-separated metric filter; omit for all four

curl
curl -X GET "https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/rips/{id}/history" \
  -H "Authorization: Bearer $TOKEN"
PHP
<?php

$url = 'https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/rips/{id}/history';
$headers = [
    'Authorization: Bearer ' . $token,
];

$ch = curl_init($url);
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => $headers,
    CURLOPT_RETURNTRANSFER => true,
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
Python
import requests

headers = {"Authorization": f"Bearer {token}"}

response = requests.get("https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/rips/{id}/history", headers=headers)
response.raise_for_status()
print(response.json())
JavaScript
const response = await fetch('https://appliance.example.com/api/v1/{applianceId}/haproxy/stats/rips/{id}/history', {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${token}`,
  },
});

const data = await response.json();
Response
{
  "status": "success",
  "message": "HAProxy RIP History",
  "data": []
}