From 221004af3919a431f08bcc801a0d491b747383ea Mon Sep 17 00:00:00 2001 From: "Anders B. Hansen" Date: Mon, 27 Feb 2023 15:03:09 +0100 Subject: [PATCH] docs: Add documentation for health check API endpoint --- docs/config.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/config.md b/docs/config.md index 5fca3ebe..7b7e9738 100644 --- a/docs/config.md +++ b/docs/config.md @@ -1067,6 +1067,16 @@ and [here](https://easyengine.io/tutorials/nginx/block-wp-login-php-bruteforce-a maxretry = 10 ``` +## Health checks +A preliminary health check API endpoint is exposed at `"/v1/health"`. The endpoint returns a `json` response in the format shown below. +If a non-200 HTTP status code is returned or if the returned `health` field is `false` the ntfy service should be considered as unhealthy. + +```json +{"health":true} +``` + +See [Installalation/Docker](install.md#docker) for an example of how this could be used in a `docker-compose` environment. + ## Logging & debugging By default, ntfy logs to the console (stderr), with an `info` log level, and in a human-readable text format.