Skip to content

Add external Prometheus address setting to gitlab.yml

What does this MR do?

This MR:

  • For user configuration: add external Prometheus listen address(gitlab_rails['prometheus_server_address']) in gitlab.rb.template
  • For generated gitlab.yml, add a new setting Prometheus.server_address. Existing Prometheus.enable and Prometheus.listen_address will respect Prometheus.server_address as well.

So that:

  • user can set external Prometheus listen address in /etc/gitlab/gitlab.rb
  • the value can be accessed in the Rails app and Sidekiq job.

Related issues

gitlab#30175 (closed)

Todo

Update documentations: https://docs.gitlab.com/ee/administration/monitoring/prometheus/, and https://docs.gitlab.com/ee/administration/high_availability/monitoring_node.html.

Checklist

See Definition of done.

  • Changelog entry created. Not applicable for Documentation changes and minor changes.
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA, if applicable
  • MR targeting master branch
  • MR has a green pipeline on GitLab.com
  • Equivalent MR/issue for CNG opened if applicable
  • trigger-package has a green pipeline running against latest commit

Reviewer Checklist

In addition to above, reviewer must:

  • Pipeline is green on dev.gitlab.org if the change is not touching documentation or internal cookbooks
Edited by Qingyu Zhao

Merge request reports