@@ -53,7 +53,7 @@ it's not recommended to change the port Prometheus listens
on as this might affect or conflict with other services running on the GitLab
server. Proceed at your own risk.
In order to access Prometheus from outside the GitLab server you will need to
In order to access Prometheus from outside the GitLab server you will need to
set a FQDN or IP in `prometheus['listen_address']`.
To change the address/port that Prometheus listens on:
...
...
@@ -79,14 +79,51 @@ To change the address/port that Prometheus listens on:
### Using an external Prometheus server
> **Note:** Prometheus and most exporters do not support authentication. We do not recommend exposing them beyond the local network.
> **Note:** Prometheus and most exporters do not support authentication. We do not recommend exposing them outside the local network.
For users who are running GitLab across multiple nodes, or want to utilize dedicated monitoring infrastructure, configuring a dedicated Prometheus instance is easy.
A few configuration changes are required to allow GitLab to be monitored by an external Prometheus server. External servers are recommended for highly available deployments of GitLab with multiple nodes.
1. Disable the bundled Prometheus server by setting `prometheus['enable'] = false`.
1. Set each bundled service's [exporter](#bundled-software-metrics) to listen on a network address, for example by setting `postgres_exporter['listen_address'] = '0.0.0.0:9187'`
1. Install and set up the dedicated Prometheus instance.
1. Add each GitLab node's metric server, and dependencies exporter, to the target list.
1. Edit `/etc/gitlab/gitlab.rb`.
1. Disable the bundled Prometheus:
```ruby
prometheus['enable']=false
```
1. Set each bundled service's [exporter](#bundled-software-metrics) to listen on a network address, for example:
1. Install and set up a dedicated Prometheus instance, if necessary, using the [official installation instructions](https://prometheus.io/docs/prometheus/latest/installation/).
1. Add the Prometheus server IP address to the [monitoring IP whitelist](https://docs.gitlab.com/ce/administration/monitoring/ip_whitelist.html). For example:
1. Edit the Prometheus server's configuration file.
1. Add each node's exporters to the Prometheus server's [scrape target configuration](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#%3Cscrape_config%3E). For example, a sample snippet using `static_configs`: