From 3959a91e4363a12be9852cb64492349362094bdf Mon Sep 17 00:00:00 2001 From: Pierre Souchay Date: Thu, 26 Jul 2018 01:17:38 +0200 Subject: [PATCH] Added explainations on how having a working configuration for Prometheus (#4397) * Added explainations on how having a working configuration for Prometheus Since Prometheus escapes by default query parameters, this paragraph explains how having `format=prometheus` to be taken into account by prometheus. * Rephrase Prometheus notes in documentation as requested by @pearkes --- website/source/docs/agent/options.html.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/website/source/docs/agent/options.html.md b/website/source/docs/agent/options.html.md index 9b0635c324..67f707def6 100644 --- a/website/source/docs/agent/options.html.md +++ b/website/source/docs/agent/options.html.md @@ -1220,6 +1220,14 @@ Consul will not enable TLS for the HTTP API unless the `https` port has been ass 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 `disable_hostname` to avoid having prefixed metrics with hostname. + Consul does not use the default Prometheus path, so Prometheus must be configured as follows. + Note that using ?format=prometheus in the path won't work as ? will be escaped, so it must be specified as a parameter. + + ```yaml + metrics_path: "/v1/agent/metrics" + params: + format: ['prometheus'] + ``` * `statsd_address` This provides the address of a statsd instance in the format `host:port`. If provided, Consul will send various telemetry information to that instance for