Files
threshold/website/content/docs/operations/metrics.mdx
T
bc86b4e9e9 Docs Changes for v0.8.0 (#2024)
* 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>
2022-05-03 16:24:04 -04:00

102 lines
5.1 KiB
Plaintext

---
layout: docs
page_title: Boundary Metrics
description: |-
Obtain visibility of various components of a running Boundary
---
## Boundary Metrics
Boundary provides metrics through the `/metrics` 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.
Metrics are important for understanding what is happening in a Boundary
deployment, enabling diagnoses of deployed controllers and workers. The exported
metrics grant greater visibility into the various components of a running
Boundary deployment through Prometheus.
The metrics uses the [OpenMetric
exposition](https://prometheus.io/docs/instrumenting/exposition_formats/#openmetrics-text-format)
format which can be read by
[Prometheus](https://prometheus.io/docs/introduction/overview/).
### Controller
The following table lists the current names and descriptions of metrics provided
by controllers.
| Name | Description |
|---------------------------------------------------------------|-----------------------------------------------|
| `boundary_controller_api_http_request_duration_seconds` | Histogram of latencies for HTTP requests. |
| `boundary_controller_api_http_request_size_bytes` | Histogram of request sizes for HTTP requests. |
| `boundary_controller_api_http_response_size_bytes` | Histogram of response sizes for HTTP requests. |
| `boundary_controller_cluster_grpc_request_duration_seconds` | Histogram of latencies for requests made to the gRPC service running on the cluster listener. |
### Worker
The following table lists the current names and descriptions of metrics provided
by workers.
| Name | Description |
|---------------------------------------------------------------|-----------------------------------------------|
| `boundary_worker_proxy_http_write_header_duration_seconds` | Histogram of time elapsed after the TLS connection is established to when the first http header is written back from the server. |
| `boundary_worker_proxy_websocket_active_connections` | A gauge of the current count of open proxy connections on the worker. |
| `boundary_worker_proxy_websocket_received_bytes_total` | Count of received bytes sent over all proxy connections handled by the worker. |
| `boundary_worker_proxy_websocket_sent_bytes_total` | Count of sent bytes sent over all proxy connections handled by the worker. |
### Other
The following table lists the current miscellaneous metrics provided by Boundary.
| Name | Description |
|---------------------------------------------------------------|-----------------------------------------------|
| `boundary_build_info` | A gauge set to 1 with label values detailing the current Go version, git revision, and Boundary version. |
### Metric Labels
Each metric uses labels to help organize and narrow its scope so that users can
filter for different characteristics, allowing more flexible analysis of the
measurements collected.
#### Metrics for HTTP requests include the following labels:
| Label | Description |
|--------------|----------------------------------------------------------------|
| `code` | The HTTP status code of the request (e.g., “200”, “400”, etc.). |
| `path` | The path, excluding query parameters, associated with the request. The value for this label replaces resource IDs with "{id}" (for example, `/v1/groups/{id}` is a possible value for this label). Any unexpected paths receive the value "unknown." |
| `method` | The name of the method on the HTTP request. For example "GET", “POST”, “DELETE”. |
#### Metrics for gRPC requests include the following labels:
| Label | Description |
|-----------------|-----------------------------------------------------------------|
| `grpc_method` | The name of the method on the grpc service (e.g., `GetGroup`). |
| `grpc_service` | The proto service name including the package (e.g., `controller.api.services.v1.GroupService`). |
| `grpc_code` | The grpc [status code](https://github.com/grpc/grpc-go/blob/master/codes/codes.go) in human-readable format. For example, `OK`, `IllegalArgument`, `Unknown`. |
## Example configuration
Defining a listener stanza in the config file is sufficient for enabling metrics
reporting in Boundary. 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
listener "tcp" {
purpose = "ops"
tls_disable = true
}
```
## Tutorial
Refer to [Prometheus
Metrics](https://learn.hashicorp.com/tutorials/boundary/prometheus-metrics)
tutorial for a step-by-step introduction to metrics.