Health and maintenance

Get the instance's health

Returns whether the instance is serving and the state of each component it depends on. Needs no credential.

GET
/health

Response body

About errors

Returns the health. status is ok or degraded.

application/json
  1. response

The instance's health: the worst state of its components, and each one's state.

status*string

ok: serving normally. degraded: serving, but something is slow, low or unknown. down: something refused.

Value in"ok""degraded""down"
claimed*|

true if the instance has an owner, false if it is waiting to be claimed with its setup code, and null if Marfa couldn't read its database to tell.

components*

Each component checked: reading and writing the database, free disk space and the blob store.

placement?

Where the server runs. Present only when it is configured.

version?string

The build the instance runs, when it is known.

backups*

Whether Marfa backs itself up to its backup folder or object store, how the last backup went, and whether the place it backs up to is taking copies.

housekeeping?

What needs attention in the background work. Present only for a caller that holds instance.read.

  • validation_error: the query has a parameter this endpoint doesn't take.
application/json
  1. response

An error response.

error*

What went wrong.

contract_mismatch: X-Marfa-Contract names another contract version than this instance speaks, or is not a whole number. Nothing was done.

application/json
  1. response

An error response.

error*

What went wrong.

internal_error: Marfa failed in a way it didn't expect, and the request may not have completed. Read what you changed before you repeat a write.

application/json
  1. response

An error response.

error*

What went wrong.

Returns the health when status is down: a component refused.

application/json
  1. response

The instance's health: the worst state of its components, and each one's state.

status*string

ok: serving normally. degraded: serving, but something is slow, low or unknown. down: something refused.

Value in"ok""degraded""down"
claimed*|

true if the instance has an owner, false if it is waiting to be claimed with its setup code, and null if Marfa couldn't read its database to tell.

components*

Each component checked: reading and writing the database, free disk space and the blob store.

placement?

Where the server runs. Present only when it is configured.

version?string

The build the instance runs, when it is known.

backups*

Whether Marfa backs itself up to its backup folder or object store, how the last backup went, and whether the place it backs up to is taking copies.

housekeeping?

What needs attention in the background work. Present only for a caller that holds instance.read.

curl -X GET 'http://localhost:8600/health'
About errors
{  "status": "ok",  "claimed": true,  "components": {    "database": {      "status": "ok",      "latency_ms": 0    },    "database_write": {      "status": "ok",      "latency_ms": 11    },    "disk": {      "status": "ok"    },    "blob_storage": {      "status": "ok"    }  },  "backups": {    "status": "ok"  }}