Using
`GET /health` — public heartbeat endpoint.
applies to v0.5.1const url = 'https://example.com/health';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/healthReturns a JSON snapshot of system vitals, summed over the data shards, in
shards the status of each data shard: ok once it answered, timeout
when it did not within 250 ms, in resources the state of disk space
(the worst of all data volumes) and of the server’s own memory, and in
io, while writes of a data file fail, their failures in a row. It names
no path and gives no size; GET /store-api/metrics does. No
authentication required.
Authorizations
Section titled “Authorizations”- None
Responses
Section titled “Responses”Every data shard answered. Status ok, or degraded while disk space or memory runs short: below a warn threshold (warning), or below a block threshold (blocked), while writes answer 507 and reads go on; resources gives the state of the disk space and of the memory, without volume, path or number. Also degraded while writes of a data file fail; io gives their failures in a row, without the file (the server stops at the third, or at the first on a read-only file system)
object
Whether disk space and the server’s own memory are short.
object
The worst state of the data volumes: ok, warning or blocked.
ok, warning or blocked.
ok, warning (below a warn threshold) or blocked (writes refused).
Every data shard, by id.
A data shard as GET /health reports it: ok once it answered its
ping, timeout otherwise.
object
ok, or degraded while a data shard does not answer, disk space
or memory runs short (resources) or writes of a data file fail
(io).
Example generated
{ "domain_count": 1, "estimated_memtable_keys": 1, "io": { "failures": 1 }, "l0_sstable_count": 1, "resources": { "disk_state": "example", "memory_state": "example", "state": "example" }, "shards": [ { "id": 1, "status": "example" } ], "status": "example", "uptime_secs": 1, "version": "example", "vlog_size_bytes": 1}A data shard did not answer within 250 ms; the full report with status degraded; its shards list names the shard with status timeout
object
Whether disk space and the server’s own memory are short.
object
The worst state of the data volumes: ok, warning or blocked.
ok, warning or blocked.
ok, warning (below a warn threshold) or blocked (writes refused).
Every data shard, by id.
A data shard as GET /health reports it: ok once it answered its
ping, timeout otherwise.
object
ok, or degraded while a data shard does not answer, disk space
or memory runs short (resources) or writes of a data file fail
(io).
Example generated
{ "domain_count": 1, "estimated_memtable_keys": 1, "io": { "failures": 1 }, "l0_sstable_count": 1, "resources": { "disk_state": "example", "memory_state": "example", "state": "example" }, "shards": [ { "id": 1, "status": "example" } ], "status": "example", "uptime_secs": 1, "version": "example", "vlog_size_bytes": 1}