* added new metrics doc * Minor format fixes * Use table to list metrics * Update website/content/docs/operations/index.mdx Co-authored-by: Robin Beck <stellarsquall@users.noreply.github.com> * fixed sentence * added worker proxy http * Update website/content/docs/operations/metrics.mdx Co-authored-by: Todd <github@quaddi.com> * Update based on the changes in draft * remove WIP note * Update website/content/docs/operations/metrics.mdx Co-authored-by: Todd <github@quaddi.com> * Update website/content/docs/operations/metrics.mdx Co-authored-by: Todd <github@quaddi.com> * Update website/content/docs/operations/index.mdx Co-authored-by: Todd <github@quaddi.com> * Removed invalid metrics * Update header level * added code styling for "ops" listener and port 9203 description * added health endpoint document * resolved cherry-pick confict for 5edac3a7418f80e7d528f2fa7a461b1125c11806 * Incorporate review feedback * removed bad reference to metrics * added Other section for boundary_build_info * fixed typo * Update website/content/docs/operations/health.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/docs/operations/metrics.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/docs/operations/health.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/docs/operations/health.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/docs/operations/health.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Update website/content/docs/operations/health.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Changed release notes structure Removed the empty "Releases" folder and now it goes straight to "Release Notes" * Update website/content/docs/operations/health.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * Incorporate review feedback * Update website/content/docs/operations/index.mdx Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> * added tutorial link * Update website/content/docs/operations/metrics.mdx Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> * Update website/content/docs/operations/metrics.mdx Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> * Update website/content/docs/operations/metrics.mdx Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> * Update website/content/docs/operations/metrics.mdx Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> * Update website/content/docs/operations/metrics.mdx Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> * Update website/content/docs/operations/metrics.mdx Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com> * 0.8 Release Notes Added release notes page for 0.8 * corrected sensitive info redaction note * cleaned up visibility overview Co-authored-by: taoism4504 <loann@hashicorp.com> Co-authored-by: Yoko Hyakuna <yoko@hashicorp.com> Co-authored-by: Loann Le <84412881+taoism4504@users.noreply.github.com> Co-authored-by: Todd <github@quaddi.com> Co-authored-by: Timothy Messier <tim.messier@gmail.com> Co-authored-by: XingLu Wang <xinglu.wang@hashicorp.com> Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
100 lines
3.6 KiB
Plaintext
100 lines
3.6 KiB
Plaintext
---
|
|
layout: docs
|
|
page_title: Boundary Health Endpoints
|
|
description: |-
|
|
Verify the Boundary controller server is up and able to receive requests
|
|
---
|
|
|
|
## Boundary Health Endpoints
|
|
|
|
Boundary provides health monitoring through the `/health` path using a listener
|
|
with the `"ops"` purpose. By default, a listener with that purpose runs on port
|
|
`9203`. See the [example configuration](#example-configuration) section for an
|
|
example listener stanza in a `config.hcl` file.
|
|
|
|
### Requirements
|
|
|
|
To enable the controller health endpoint, any Boundary instance must be
|
|
started with a controller. That is, a `controller` block and a `purpose = "api"`
|
|
listener must be defined in Boundary's configuration file. Additionally, a
|
|
`purpose = "ops"` listener must also be defined in Boundary's configuration
|
|
file. Under these conditions, the `ops` server (which hosts the controller health
|
|
api) will be exposed.
|
|
|
|
### Shutdown Grace Period
|
|
|
|
Optionally, when the controller health endpoint is enabled, Boundary can be
|
|
configured to change the controller health response to `503 Service Unavailable`
|
|
upon receiving a shutdown signal, and wait a configurable amount of time before
|
|
starting the shutdown process.
|
|
|
|
This feature is designed to integrate with load balancers to reduce the risk of
|
|
an outgoing Boundary instance causing disruption to incoming requests.
|
|
|
|
In this state, Boundary is still capable of processing requests as normal, but
|
|
will report as unhealthy through the controller health endpoint. In
|
|
load-balanced environments, this would cause this "unhealthy" instance to be
|
|
removed from the pool of instances eligible to handle requests, and thereby, reducing the
|
|
likelihood that it will receive a request to handle during shutdown.
|
|
|
|
This feature is disabled by default, even if the controller health endpoint is
|
|
enabled. You can set it up by defining `graceful_shutdown_wait_duration` in the
|
|
`controller` block of Boundary's configuration file. The value should be set to
|
|
a string that is parseable by
|
|
[ParseDuration](https://pkg.go.dev/time#ParseDuration).
|
|
|
|
### API
|
|
|
|
The new controller health service introduces a single read-only endpoint:
|
|
|
|
| Status | Description |
|
|
|--------------|----------------------------------------------------------------|
|
|
| `200` | `GET /health` returns HTTP status 200 OK if the controller's api gRPC Server is up |
|
|
| `5xx` | `GET /health` returns HTTP status `5XX` or request timeout if unhealthy |
|
|
| `503` | `GET /health` returns HTTP status `503 Service Unavailable` status if the controller is shutting down |
|
|
|
|
All responses return empty bodies. `GET /health` does not support any input.
|
|
|
|
## Example configuration
|
|
|
|
Health checks are available for a controller defined with a `purpose = "ops"`
|
|
listener stanza. For details on what fields are allowed in this stanza, refer to
|
|
the documentation about [TCP Listener](/docs/configuration/listener/tcp).
|
|
|
|
An example listener stanza:
|
|
|
|
```hcl
|
|
controller {
|
|
name = "boundary-controller"
|
|
database {
|
|
url = "postgresql://<username>:<password>@10.0.0.1:5432/<database_name>"
|
|
}
|
|
}
|
|
|
|
listener "tcp" {
|
|
purpose = "api"
|
|
tls_disable = true
|
|
}
|
|
|
|
listener "tcp" {
|
|
purpose = "ops"
|
|
tls_disable = true
|
|
}
|
|
```
|
|
|
|
To enable a shutdown grace period, update the `controller` block with a defined
|
|
wait duration:
|
|
|
|
```hcl
|
|
controller {
|
|
name = "boundary-controller"
|
|
database {
|
|
url = "env://BOUNDARY_PG_URL"
|
|
}
|
|
graceful_shutdown_wait_duration = "10s"
|
|
}
|
|
```
|
|
|
|
A complete example can be viewed under the [Controller
|
|
configuration](/docs/configuration/controller#complete-configuration-example)
|
|
docs. |