mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
Clearer documentation and comments for enabling Prometheus support
This commit is contained in:
parent
27362320e8
commit
a680c8e91b
@ -425,7 +425,10 @@ type RuntimeConfig struct {
|
|||||||
// hcl: telemetry { dogstatsd_tags = []string }
|
// hcl: telemetry { dogstatsd_tags = []string }
|
||||||
TelemetryDogstatsdTags []string
|
TelemetryDogstatsdTags []string
|
||||||
|
|
||||||
// PrometheusRetentionTime enables prometheus Support for metrics if greater than 0
|
// PrometheusRetentionTime is the retention time for prometheus metrics if greater than 0.
|
||||||
|
// A value of 0 disable Prometheus support. Regarding Prometheus, it is considered a good
|
||||||
|
// practice to put large values here (such as a few days), and at least the interval between
|
||||||
|
// prometheus requests.
|
||||||
//
|
//
|
||||||
// hcl: telemetry { prometheus_retention_time = "duration" }
|
// hcl: telemetry { prometheus_retention_time = "duration" }
|
||||||
TelemetryPrometheusRetentionTime time.Duration
|
TelemetryPrometheusRetentionTime time.Duration
|
||||||
|
@ -1332,8 +1332,11 @@ Consul will not enable TLS for the HTTP API unless the `https` port has been ass
|
|||||||
* <a name="telemetry-prometheus_retention_time"></a><a href="telemetry-prometheus_retention_time">prometheus_retention_time</a>
|
* <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.
|
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
|
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).
|
(it might have an impact on Consul's memory usage). A good value for this parameter is at least 2 times the interval of scrape
|
||||||
Fetching the metrics using prometheus can then be performed using the `/v1/agent/metrics?format=prometheus`.
|
of Prometheus, but you might also put a very high retention time such as a few days (for instance 744h to enable retention
|
||||||
|
to 31 days).
|
||||||
|
Fetching the metrics using prometheus can then be performed using the `/v1/agent/metrics?format=prometheus` URL or by sending
|
||||||
|
the Accept header with value `text/plain; version=0.0.4; charset=utf-8` to the `/v1/agent/metrics` (as done by Prometheus).
|
||||||
The format is compatible natively with prometheus. When running in this mode, it is recommended to also enable the option
|
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 href="#telemetry-disable_hostname">`disable_hostname`</a> to avoid having prefixed metrics with hostname.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user