mirror of https://github.com/status-im/consul.git
docs: new rpc metric (#12608)
This commit is contained in:
parent
059bd0a92e
commit
64e35777e0
|
@ -519,6 +519,52 @@ These metrics are used to monitor the health of the Consul servers.
|
||||||
| `consul.grpc.server.streams` | Measures the number of active gRPC streams handled by the server. | streams | gauge |
|
| `consul.grpc.server.streams` | Measures the number of active gRPC streams handled by the server. | streams | gauge |
|
||||||
| `consul.xds.server.streams` | Measures the number of active xDS streams handled by the server split by protocol version. | streams | gauge |
|
| `consul.xds.server.streams` | Measures the number of active xDS streams handled by the server split by protocol version. | streams | gauge |
|
||||||
|
|
||||||
|
|
||||||
|
## Server Workload
|
||||||
|
|
||||||
|
** Requirements: **
|
||||||
|
* Consul 1.12.0+
|
||||||
|
|
||||||
|
Label based RPC metrics were added in Consul 1.12.0 as a Beta feature to better understand the workload on a Consul server and, where that workload is coming from. The following metric(s) provide that insight
|
||||||
|
|
||||||
|
| Metric | Description | Unit | Type |
|
||||||
|
| ------------------------------------- | --------------------------------------------------------- | ------ | --------- |
|
||||||
|
| `consul.rpc.server.call` | Measures the elapsed time taken to complete an RPC call. | ms | summary |
|
||||||
|
|
||||||
|
Note that values of the `consul.rpc.server.call` may emit as `0 ms`. That means that the elapsed time < `1 ms`.
|
||||||
|
|
||||||
|
### Labels
|
||||||
|
|
||||||
|
The the server workload metrics above come with the following labels:
|
||||||
|
|
||||||
|
| Label Name | Description | Possible values |
|
||||||
|
| ------------------------------------- | --------------------------------------------------------- | --------------------------------------- |
|
||||||
|
| `method` | The name of the RPC method. | The value of any RPC request in Consul. |
|
||||||
|
| `errored` | Indicates whether the RPC call errored. | `True` or `False`. |
|
||||||
|
| `request_type` | Whether it is a `read` or `write` request. | `read`, `write` or `unreported`. |
|
||||||
|
| `rpc_type` | The RPC implementation. | `net/rpc` or `internal`. |
|
||||||
|
|
||||||
|
#### Label Explanations
|
||||||
|
|
||||||
|
The `internal` value for the `rpc_type` in the table above refers to leader and cluster management RPC operations that Consul performs.
|
||||||
|
Historically, `internal` RPC operation metrics were accounted under the same metric names.
|
||||||
|
|
||||||
|
The `unreported` value for the `request_type` in the table above refers to RPC requests within Consul where it is difficult to ascertain whether a request is `read` or `write` type.
|
||||||
|
|
||||||
|
Here is a Prometheus style example of an RPC metric and its labels:
|
||||||
|
|
||||||
|
<CodeBlockConfig heading="Sample output of telemetry dump">
|
||||||
|
|
||||||
|
```json
|
||||||
|
...
|
||||||
|
consul_rpc_server_call{errored="false",method="Catalog.ListNodes",request_type="read",rpc_type="net/rpc",quantile="0.5"} 255
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
</CodeBlockConfig>
|
||||||
|
|
||||||
|
Any metric in this section can be turned off with the [`prefix_filter`](/docs/agent/options#telemetry-prefix_filter).
|
||||||
|
|
||||||
## Cluster Health
|
## Cluster Health
|
||||||
|
|
||||||
These metrics give insight into the health of the cluster as a whole.
|
These metrics give insight into the health of the cluster as a whole.
|
||||||
|
|
Loading…
Reference in New Issue