Admin Server

PostgREST provides an admin server that can be enabled by setting admin-server-port to the port number of your preference.

Health Check

You can enable a health check to verify if PostgREST is available for client requests. Also to check the status of its internal state.

Two endpoints live and ready will then be available.

Important

If you have a machine with multiple network interfaces and multiple PostgREST instances in the same port, you need to specify a unique hostname in the configuration of each PostgREST instance for the health check to work correctly. Don’t use the special values(!4, *, etc) in this case because the health check could report a false positive.

Live

The live endpoint verifies if PostgREST is running on its configured port. A request will return 200 OK if PostgREST is alive or 503 otherwise.

For instance, to verify if PostgREST is running while the admin-server-port is set to 3001:

curl -I "http://localhost:3001/live"
HTTP/1.1 200 OK

Ready

In addition, the ready endpoint checks the state of the Connection Pool and the Schema Cache. A request will return 200 OK if both are good or 503 if not.

curl -I "http://localhost:3001/ready"
HTTP/1.1 200 OK

Metrics

Provides Metrics.