From: Paul Cuzner Date: Fri, 28 Apr 2023 05:21:39 +0000 (+1200) Subject: docs: Update the Prometheus endpoint info X-Git-Tag: v18.1.0~141^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1fc21ac420f9e6285b9b358c9de94ccb018fab7e;p=ceph.git docs: Update the Prometheus endpoint info This patch just tidies up some of the links and adds an example showing how the http_sd_configs option may be used. Signed-off-by: Paul Cuzner (cherry picked from commit 690d34ab08f22cd988828aa2097531627000907e) --- diff --git a/doc/cephadm/services/monitoring.rst b/doc/cephadm/services/monitoring.rst index 226f0748e0c5..560a95b51461 100644 --- a/doc/cephadm/services/monitoring.rst +++ b/doc/cephadm/services/monitoring.rst @@ -200,12 +200,12 @@ configuration files for monitoring services. Internally, cephadm already uses `Jinja2 `_ templates to generate the configuration files for all monitoring components. Starting from version 17.2.3, -cephadm uses Prometheus http service discovery support `http_sd_config -` -in order to get the currently configured targets from Ceph. Internally, `ceph-mgr` -provides a service discovery endpoint at `:8765/sd/` (port is -configurable through the variable `service_discovery_port`) which is used by -Prometheus to get the needed targets. +cephadm supports Prometheus http service discovery, and uses this endpoint for the +definition and management of the embedded Prometheus service. The endpoint listens on +``https://:8765/sd/`` (the port is +configurable through the variable ``service_discovery_port``) and returns scrape target +information in `http_sd_config format +`_ Customers with external monitoring stack can use `ceph-mgr` service discovery endpoint to get scraping configuration. Root certificate of the server can be obtained by the @@ -312,11 +312,20 @@ cluster. By default, ceph-mgr presents prometheus metrics on port 9283 on each host running a ceph-mgr daemon. Configure prometheus to scrape these. -To make this integration easier, Ceph provides by means of `ceph-mgr` a service -discovery endpoint at `:8765/sd/` which can be used by an external -Prometheus to retrieve targets information. Information reported by this EP used -the format specified by `http_sd_config -` +To make this integration easier, cephadm provides a service discovery endpoint at +``https://:8765/sd/``. This endpoint can be used by an external +Prometheus server to retrieve target information for a specific service. Information returned +by this endpoint uses the format specified by the Prometheus `http_sd_config option +`_ + +Here's an example prometheus job definition that uses the cephadm service discovery endpoint + + .. code-block:: bash + + - job_name: 'ceph-exporter' + http_sd_configs: + - url: http://:8765/sd/prometheus/sd-config?service=ceph-exporter + * To enable the dashboard's prometheus-based alerting, see :ref:`dashboard-alerting`.