]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/telemetry: fix and document proxy usage 33575/head
authorLars Marowsky-Bree <lmb@suse.com>
Thu, 27 Feb 2020 10:11:01 +0000 (11:11 +0100)
committerLars Marowsky-Bree <lmb@suse.com>
Thu, 27 Feb 2020 10:11:01 +0000 (11:11 +0100)
This addresses https://tracker.ceph.com/issues/44320 - fix and document
use of proxies for mgr/telemetry.

Signed-off-by: Lars Marowsky-Bree <lmb@suse.com>
doc/mgr/telemetry.rst
src/pybind/mgr/telemetry/module.py

index ea42d387ea1e3d686ce1e923415f8b514eb1ec97..9734b7b8e14eb98fdd817a21da63461e523e7c87 100644 (file)
@@ -114,6 +114,20 @@ The see the current configuration::
 
   ceph telemetry status
 
+Sending telemetry through a proxy
+---------------------------------
+
+If the cluster cannot directly connect to the configured telemetry
+endpoint (default *telemetry.ceph.com*), you can configure a HTTP/HTTPS
+proxy server with::
+
+  ceph config set mgr mgr/telemetry/proxy https://10.0.0.1:8080
+
+You can also include a *user:pass* if needed::
+
+  ceph config set mgr mgr/telemetry/proxy https://ceph:telemetry@10.0.0.1:8080
+
+
 Contact and Description
 -----------------------
 
index 52d83d3263c1a451d479432997b66fdd7d4738e2..d1f416c69f90816538255ffb5d5426403be1bb8b 100644 (file)
@@ -681,7 +681,7 @@ class Module(MgrModule):
             proxies['http'] = self.proxy
             proxies['https'] = self.proxy
         try:
-            resp = requests.put(url=url, json=report)
+            resp = requests.put(url=url, json=report, proxies=proxies)
             resp.raise_for_status()
         except Exception as e:
             fail_reason = 'Failed to send %s to %s: %s' % (what, url, str(e))