diff --git a/site/content/configuration/health-checks.md b/site/content/configuration/health-checks.md index 566bcc4765..a8e8f68a96 100644 --- a/site/content/configuration/health-checks.md +++ b/site/content/configuration/health-checks.md @@ -4,25 +4,29 @@ draft: false weight: 400 toc: true tags: [ "docs" ] -docs: "DOCS-XXX" categories: ["configuration"] doctypes: ["task"] --- ## Overview -To monitor the state of the NGINX Agent, there is a health endpoint in the REST API that can be used. -## Configure REST API -To enable the REST API, the following configuration is needed: -```nginx configuration +The REST API includes a health endpoint for keeping track of the status of NGINX Agent. + +## Configure the REST API + +To enable the REST API, use the following configuration: + +```nginx api: host: 127.0.0.1 port: 8038 ``` ## Using health checks -Once the REST API is enabled, calling the `/health` endpoint will return the following json response: -``` + +After you enable the REST API, calling the `/health` endpoint returns the following JSON response: + +```json { "status": "OK", "checks": [ @@ -42,14 +46,17 @@ Once the REST API is enabled, calling the `/health` endpoint will return the fol } ``` -The top level `status` field is the overall health status of the NGINX Agent. There are 3 states that the health status can be in. -1. `PENDING`: The NGINX Agent is still determining the it's health status. -2. `OK`: The NGINX Agent is in a healthy state. -3. `ERROR`: The NGINX Agent is in an unhealthy state. +The top-level `status` field is the overall health status of NGINX Agent. The health status can return three different states: + +1. `PENDING`: NGINX Agent is still determining its health status. +2. `OK`: NGINX Agent is in a healthy state. +3. `ERROR`: NGINX Agent is in an unhealthy state. + +We do three checks to determine the overall health of the NGINX Agent: + +1. `registration`: Checks if NGINX Agent has successfully registered with the management plane server. +2. `commandConnection`: Checks if NGINX Agent is still able to receive and send commands. +3. `metricsConnection`: Checks if NGINX Agent is still able to send metric reports. -To determine the overall health of the NGINX Agent, there are 3 checks that are performed. -1. `registration`: This checks if the NGINX Agent has successfully registered with the management plane server. -2. `commandConnection`: This checks if the NGINX Agent is still able to receive and send commands. -3. `metricsConnection`: This checks if the NGINX Agent is still able to send metric reports. +If any of the checks are in an `ERROR` status, then the overall status of NGINX Agent will change to `ERROR` as well. -If any of these checks have an `ERROR` status, then the overall status of the NGINX Agent will change to `ERROR` as well.