Commit 2428a550 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis

Merge branch 'bjk/ha_whitelist' into 'master'

Update HA monitoring documentation

See merge request gitlab-org/gitlab-ce!30070
parents fc35892a b0821c14
...@@ -158,12 +158,11 @@ If you enable Monitoring, it must be enabled on **all** GitLab servers. ...@@ -158,12 +158,11 @@ If you enable Monitoring, it must be enabled on **all** GitLab servers.
sidekiq['listen_address'] = "0.0.0.0" sidekiq['listen_address'] = "0.0.0.0"
unicorn['listen'] = '0.0.0.0' unicorn['listen'] = '0.0.0.0'
# Add the monitoring node's IP address to the monitoring whitelist and allow it to scrape the NGINX metrics # Add the monitoring node's IP address to the monitoring whitelist and allow it to
# Replace placeholder # scrape the NGINX metrics. Replace placeholder `monitoring.gitlab.example.com` with
# monitoring.gitlab.example.com # the address and/or subnets gathered from the monitoring node(s).
# with the addresses gathered for the monitoring node gitlab_rails['monitoring_whitelist'] = ['monitoring.gitlab.example.com', '127.0.0.0/8']
gitlab_rails['monitoring_whitelist'] = ['monitoring.gitlab.example.com'] nginx['status']['options']['allow'] = ['monitoring.gitlab.example.com', '127.0.0.0/8']
nginx['status']['options']['allow'] = ['monitoring.gitlab.example.com']
``` ```
1. Run `sudo gitlab-ctl reconfigure` to compile the configuration. 1. Run `sudo gitlab-ctl reconfigure` to compile the configuration.
......
...@@ -62,6 +62,33 @@ See our [HA documentation for PostgreSQL](database.md) for information on runnin ...@@ -62,6 +62,33 @@ See our [HA documentation for PostgreSQL](database.md) for information on runnin
1. At this point, your instance should connect to the database through pgbouncer. If you are having issues, see the [Troubleshooting](#troubleshooting) section 1. At this point, your instance should connect to the database through pgbouncer. If you are having issues, see the [Troubleshooting](#troubleshooting) section
## Enable Monitoring
> [Introduced](https://gitlab.com/gitlab-org/omnibus-gitlab/issues/3786) in GitLab 12.0.
If you enable Monitoring, it must be enabled on **all** pgbouncer servers.
1. Create/edit `/etc/gitlab/gitlab.rb` and add the following configuration:
```ruby
# Enable service discovery for Prometheus
consul['enable'] = true
consul['monitoring_service_discovery'] = true
# Replace placeholders
# Y.Y.Y.Y consul1.gitlab.example.com Z.Z.Z.Z
# with the addresses of the Consul server nodes
consul['configuration'] = {
retry_join: %w(Y.Y.Y.Y consul1.gitlab.example.com Z.Z.Z.Z),
}
# Set the network addresses that the exporters will listen on
node_exporter['listen_address'] = '0.0.0.0:9100'
pgbouncer_exporter['listen_address'] = '0.0.0.0:9188'
```
1. Run `sudo gitlab-ctl reconfigure` to compile the configuration.
### Interacting with pgbouncer ### Interacting with pgbouncer
#### Administrative console #### Administrative console
......
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