Skip to content

Add setting for external Prometheus address in gitlab.yml

Problem to solve

For GitLab instances that are using the internal Prometheus provided by Omnibus, the self-monitoring/instance administration project will be automatically configured to connect to the internal Prometheus server.

GitLab instances that are using an external Prometheus server need to modify their gitlab.yml file and set prometheus.enable to true and set the external address in prometheus.listen_address to get SelfMonitoring::Project::CreateService to automatically configure the self-monitoring/instance administration project to connect to the external Prometheus. The changes to the gitlab.yml file will be overwritten by Omnibus the next time reconfigure is run.

We can introduce a new setting in Omnibus into which the user can set their external Prometheus address. Omnibus will save the external address URL into gitlab.yml and SelfMonitoring::Project::CreateService will read it from gitlab.yml and use it (as suggested in omnibus-gitlab!3383 (comment 192732418))

We should also look to rename Gitlab::Prometheus::Internal, since we won't necessarily be dealing with just localhost i.e. internal Prometheus servers anymore.

Intended users

Further details

Proposal

Permissions and Security

Documentation

Testing

What does success look like, and how can we measure that?

Links / references

Edited by Matthias Käppler