Commit e20d8676 authored by Qingyu Zhao's avatar Qingyu Zhao Committed by Achilleas Pipinellis

Update documents for external prometheus server setting

parent d06f1347
...@@ -71,6 +71,19 @@ Omnibus: ...@@ -71,6 +71,19 @@ Omnibus:
1. Run `sudo gitlab-ctl reconfigure` to compile the configuration. 1. Run `sudo gitlab-ctl reconfigure` to compile the configuration.
The next step is to tell all the other nodes where the monitoring node is:
1. Edit `/etc/gitlab/gitlab.rb`, and add, or find and uncomment the following line:
```ruby
gitlab_rails['prometheus_address'] = '10.0.0.1:9090'
```
Where `10.0.0.1:9090` is the IP address and port of the Prometheus node.
1. Save the file and [reconfigure GitLab](../restart_gitlab.md#omnibus-gitlab-reconfigure) for the changes to
take effect.
## Migrating to Service Discovery ## Migrating to Service Discovery
Once monitoring using Service Discovery is enabled with `consul['monitoring_service_discovery'] = true`, Once monitoring using Service Discovery is enabled with `consul['monitoring_service_discovery'] = true`,
......
...@@ -145,6 +145,12 @@ To use an external Prometheus server: ...@@ -145,6 +145,12 @@ To use an external Prometheus server:
gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8', '192.168.0.1'] gitlab_rails['monitoring_whitelist'] = ['127.0.0.0/8', '192.168.0.1']
``` ```
1. On **all** GitLab Rails(Puma/Unicorn, Sidekiq) servers, set the Prometheus server IP address and listen port. For example:
```ruby
gitlab_rails['prometheus_address'] = '192.168.0.1:9090'
```
1. To scrape NGINX metrics, you'll also need to configure NGINX to allow the Prometheus server 1. To scrape NGINX metrics, you'll also need to configure NGINX to allow the Prometheus server
IP. For example: IP. For example:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment