mirror of https://github.com/status-im/consul.git
Added documentation for telemetry{ prometheus_retention_time = duration }
This commit is contained in:
parent
93a01b0949
commit
39bd2b78e6
|
@ -237,14 +237,19 @@ $ curl \
|
||||||
This endpoint returns the configuration and member information of the local
|
This endpoint returns the configuration and member information of the local
|
||||||
agent.
|
agent.
|
||||||
|
|
||||||
| Method | Path | Produces |
|
| Method | Path | Produces |
|
||||||
| ------ | ---------------------------- | -------------------------- |
|
| ------ | ---------------------------------- | ------------------------------------------ |
|
||||||
| `GET` | `/agent/metrics` | `application/json` |
|
| `GET` | `/agent/metrics` | `application/json` |
|
||||||
|
| `GET` | `/agent/metrics?format=prometheus` | `text/plain; version=0.0.4; charset=utf-8` |
|
||||||
|
|
||||||
This endpoint will dump the metrics for the most recent finished interval.
|
This endpoint will dump the metrics for the most recent finished interval.
|
||||||
For more information about metrics, see the [telemetry](/docs/agent/telemetry.html)
|
For more information about metrics, see the [telemetry](/docs/agent/telemetry.html)
|
||||||
page.
|
page.
|
||||||
|
|
||||||
|
In order to enable [Prometheus](https://prometheus.io/) support, you need to use the
|
||||||
|
configuration directive
|
||||||
|
[`prometheus_retention_time`](/docs/agent/options.html#telemetry-prometheus_retention_time).
|
||||||
|
|
||||||
| Blocking Queries | Consistency Modes | ACL Required |
|
| Blocking Queries | Consistency Modes | ACL Required |
|
||||||
| ---------------- | ----------------- | ------------ |
|
| ---------------- | ----------------- | ------------ |
|
||||||
| `NO` | `none` | `agent:read` |
|
| `NO` | `none` | `agent:read` |
|
||||||
|
|
|
@ -1329,6 +1329,14 @@ Consul will not enable TLS for the HTTP API unless the `https` port has been ass
|
||||||
is overlap between two rules, the more specific rule will take precedence. Blocking will take priority if the same
|
is overlap between two rules, the more specific rule will take precedence. Blocking will take priority if the same
|
||||||
prefix is listed multiple times.
|
prefix is listed multiple times.
|
||||||
|
|
||||||
|
* <a name="telemetry-prometheus_retention_time"></a><a href="telemetry-prometheus_retention_time">prometheus_retention_time</a>
|
||||||
|
If the value is greater than `0s` (the default), this enables [Prometheus](https://prometheus.io/) export of metrics.
|
||||||
|
The duration can be expressed using the duration semantics and will aggregates all counters for the duration specified
|
||||||
|
(it might have an impact on Consul's memory usage).
|
||||||
|
Fetching the metrics using prometheus can then be performed using the `/v1/agent/metrics?format=prometheus`.
|
||||||
|
The format is compatible natively with prometheus. When running in this mode, it is recommended to also enable the option
|
||||||
|
<a href="#telemetry-disable_hostname">`disable_hostname`</a> to avoid having prefixed metrics with hostname.
|
||||||
|
|
||||||
* <a name="telemetry-enable_deprecated_names"></a><a href="#telemetry-enable_deprecated_names">`enable_deprecated_names`
|
* <a name="telemetry-enable_deprecated_names"></a><a href="#telemetry-enable_deprecated_names">`enable_deprecated_names`
|
||||||
</a>Added in Consul 1.0, this enables old metric names of the format `consul.consul...` to be sent alongside
|
</a>Added in Consul 1.0, this enables old metric names of the format `consul.consul...` to be sent alongside
|
||||||
other metrics. Defaults to false.
|
other metrics. Defaults to false.
|
||||||
|
|
|
@ -23,7 +23,8 @@ Additionally, if the [`telemetry` configuration options](/docs/agent/options.htm
|
||||||
are provided, the telemetry information will be streamed to a
|
are provided, the telemetry information will be streamed to a
|
||||||
[statsite](http://github.com/armon/statsite) or [statsd](http://github.com/etsy/statsd) server where
|
[statsite](http://github.com/armon/statsite) or [statsd](http://github.com/etsy/statsd) server where
|
||||||
it can be aggregated and flushed to Graphite or any other metrics store. This
|
it can be aggregated and flushed to Graphite or any other metrics store. This
|
||||||
information can also be viewed with the [metrics endpoint](/api/agent.html#view-metrics)
|
information can also be viewed with the [metrics endpoint](/api/agent.html#view-metrics) in JSON
|
||||||
|
format or using [Prometheus](https://prometheus.io/) format.
|
||||||
|
|
||||||
Below is sample output of a telemetry dump:
|
Below is sample output of a telemetry dump:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue