summaryrefslogtreecommitdiff
path: root/doc/administration/monitoring/prometheus/web_exporter.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/administration/monitoring/prometheus/web_exporter.md')
-rw-r--r--doc/administration/monitoring/prometheus/web_exporter.md20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/administration/monitoring/prometheus/web_exporter.md b/doc/administration/monitoring/prometheus/web_exporter.md
index 4b449a1d74e..fe140b15ed2 100644
--- a/doc/administration/monitoring/prometheus/web_exporter.md
+++ b/doc/administration/monitoring/prometheus/web_exporter.md
@@ -51,3 +51,23 @@ To enable the dedicated server:
for the changes to take effect.
Metrics can now be served and scraped from `localhost:8083/metrics`.
+
+## Enable HTTPS
+
+> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/364771) in GitLab 15.2.
+
+To serve metrics via HTTPS instead of HTTP, enable TLS in the exporter settings:
+
+1. Edit `/etc/gitlab/gitlab.rb` to add (or find and uncomment) the following lines:
+
+ ```ruby
+ puma['exporter_tls_enabled'] = true
+ puma['exporter_tls_cert_path'] = "/path/to/certificate.pem"
+ puma['exporter_tls_key_path'] = "/path/to/private-key.pem"
+ ```
+
+1. Save the file and [reconfigure GitLab](../../restart_gitlab.md#omnibus-gitlab-reconfigure)
+ for the changes to take effect.
+
+When TLS is enabled, the same `port` and `address` will be used as described above.
+The metrics server cannot serve both HTTP and HTTPS at the same time.