This commit is contained in:
seb
2026-10-19 01:53:25 +02:00
parent c958ecf604
commit e14a8ee8f0
5 changed files with 30 additions and 8 deletions

View File

@@ -499,7 +499,7 @@ _none_
_none_
- Returns: `200 { ok: bool }`
#### Health latency history — `GET /health/latency`
_none_
- Params: `query: range?: str`
- Returns: `200 { raw: { timestamp: int, value: num }[], avg: { timestamp: int, value: num }[], max: { timestamp: int, value: num }[] }`
### Section: /image

View File

@@ -384,7 +384,7 @@ _none_
### Section: /health
#### Health latency history — `GET /health/latency`
_none_
- Params: `query: range?: str`
- Returns: `200 { raw: { timestamp: int, value: num }[], avg: { timestamp: int, value: num }[], max: { timestamp: int, value: num }[] }`
### Section: /labeltemplate

View File

@@ -4,7 +4,13 @@ Protected. Requires a valid session cookie (`credentials: 'include'`).
Health latency history
Returns the database healthcheck latency (ms) as three series, each oldest first with unix-ms timestamps. `raw` holds the per-minute samples of the last 3 hours; `avg` and `max` hold the 30-minute aggregates (over the last 4 hours of samples) kept for 30 days. Requires a valid JWT; no company selection needed.
Returns the database healthcheck latency (ms), each series oldest first with unix-ms timestamps. By default (`range=3h`) only `raw` is returned, the per-minute samples of the last 3 hours. With `range=all` the 30-day `avg` and `max` series (30-minute aggregates over the last 4 hours of samples) are included as well. Requires a valid JWT; no company selection needed.
## Query parameters
| Param | Required | Type | Description |
|-------|----------|------|-------------|
| `range` | no | string | `3h` (default) returns only the per-minute samples of the last 3 hours; `all` also includes the 30-day avg and max series. |
## Response `200`