From 984a3f88f39b65f50fe36d9dd0c2ed9d32c62df7 Mon Sep 17 00:00:00 2001 From: Grant Young Date: Wed, 6 Apr 2022 15:54:19 +0100 Subject: [PATCH] Update RA docs with missing Prom config Ensures Prom can scrape non discoverable components as well as ensure Gitaly exporters are on --- .../reference_architectures/10k_users.md | 44 +++++++++++++++++++ .../reference_architectures/25k_users.md | 44 +++++++++++++++++++ .../reference_architectures/3k_users.md | 44 +++++++++++++++++++ .../reference_architectures/50k_users.md | 44 +++++++++++++++++++ .../reference_architectures/5k_users.md | 44 +++++++++++++++++++ 5 files changed, 220 insertions(+) diff --git a/doc/administration/reference_architectures/10k_users.md b/doc/administration/reference_architectures/10k_users.md index a90c774f4dfd7a..288640e8da0637 100644 --- a/doc/administration/reference_architectures/10k_users.md +++ b/doc/administration/reference_architectures/10k_users.md @@ -1533,6 +1533,26 @@ On each node: # Recommended to be enabled for improved performance but can notably increase disk I/O # Refer to https://docs.gitlab.com/ee/administration/gitaly/configure_gitaly.html#pack-objects-cache for more info gitaly['pack_objects_cache_enabled'] = true + + # Configure the Consul agent + consul['enable'] = true + ## Enable service discovery for Prometheus + consul['monitoring_service_discovery'] = true + + # START user configuration + # Please set the real values as explained in Required Information section + # + ## The IPs of the Consul server nodes + ## You can also use FQDNs and intermix them with IPs + consul['configuration'] = { + retry_join: %w(10.6.0.11 10.6.0.12 10.6.0.13), + } + + # Set the network addresses that the exporters will listen on for monitoring + node_exporter['listen_address'] = '0.0.0.0:9100' + gitaly['prometheus_listen_addr'] = '0.0.0.0:9236' + # + # END user configuration ``` 1. Append the following to `/etc/gitlab/gitlab.rb` for each respective server: @@ -2095,6 +2115,30 @@ To configure the Monitoring node: retry_join: %w(10.6.0.11 10.6.0.12 10.6.0.13) } + # Configure Prometheus to scrape services not covered by discovery + prometheus['scrape_configs'] = [ + { + 'job_name': 'pgbouncer', + 'static_configs' => [ + 'targets' => [ + "10.6.0.31:9188", + "10.6.0.32:9188", + "10.6.0.33:9188", + ], + ], + }, + { + 'job_name': 'praefect', + 'static_configs' => [ + 'targets' => [ + "10.6.0.131:9652", + "10.6.0.132:9652", + "10.6.0.133:9652", + ], + ], + }, + ] + # Nginx - For Grafana access nginx['enable'] = true ``` diff --git a/doc/administration/reference_architectures/25k_users.md b/doc/administration/reference_architectures/25k_users.md index 1e130ee5dac6e0..bd503c63059e1b 100644 --- a/doc/administration/reference_architectures/25k_users.md +++ b/doc/administration/reference_architectures/25k_users.md @@ -1537,6 +1537,26 @@ On each node: # Recommended to be enabled for improved performance but can notably increase disk I/O # Refer to https://docs.gitlab.com/ee/administration/gitaly/configure_gitaly.html#pack-objects-cache for more info gitaly['pack_objects_cache_enabled'] = true + + # Configure the Consul agent + consul['enable'] = true + ## Enable service discovery for Prometheus + consul['monitoring_service_discovery'] = true + + # START user configuration + # Please set the real values as explained in Required Information section + # + ## The IPs of the Consul server nodes + ## You can also use FQDNs and intermix them with IPs + consul['configuration'] = { + retry_join: %w(10.6.0.11 10.6.0.12 10.6.0.13), + } + + # Set the network addresses that the exporters will listen on for monitoring + node_exporter['listen_address'] = '0.0.0.0:9100' + gitaly['prometheus_listen_addr'] = '0.0.0.0:9236' + # + # END user configuration ``` 1. Append the following to `/etc/gitlab/gitlab.rb` for each respective server: @@ -2100,6 +2120,30 @@ To configure the Monitoring node: retry_join: %w(10.6.0.11 10.6.0.12 10.6.0.13) } + # Configure Prometheus to scrape services not covered by discovery + prometheus['scrape_configs'] = [ + { + 'job_name': 'pgbouncer', + 'static_configs' => [ + 'targets' => [ + "10.6.0.31:9188", + "10.6.0.32:9188", + "10.6.0.33:9188", + ], + ], + }, + { + 'job_name': 'praefect', + 'static_configs' => [ + 'targets' => [ + "10.6.0.131:9652", + "10.6.0.132:9652", + "10.6.0.133:9652", + ], + ], + }, + ] + # Nginx - For Grafana access nginx['enable'] = true ``` diff --git a/doc/administration/reference_architectures/3k_users.md b/doc/administration/reference_architectures/3k_users.md index 7b8438f0fd14a7..b6da6daaaaa8d0 100644 --- a/doc/administration/reference_architectures/3k_users.md +++ b/doc/administration/reference_architectures/3k_users.md @@ -1477,6 +1477,26 @@ On each node: # Recommended to be enabled for improved performance but can notably increase disk I/O # Refer to https://docs.gitlab.com/ee/administration/gitaly/configure_gitaly.html#pack-objects-cache for more info gitaly['pack_objects_cache_enabled'] = true + + # Configure the Consul agent + consul['enable'] = true + ## Enable service discovery for Prometheus + consul['monitoring_service_discovery'] = true + + # START user configuration + # Please set the real values as explained in Required Information section + # + ## The IPs of the Consul server nodes + ## You can also use FQDNs and intermix them with IPs + consul['configuration'] = { + retry_join: %w(10.6.0.11 10.6.0.12 10.6.0.13), + } + + # Set the network addresses that the exporters will listen on for monitoring + node_exporter['listen_address'] = '0.0.0.0:9100' + gitaly['prometheus_listen_addr'] = '0.0.0.0:9236' + # + # END user configuration ``` 1. Append the following to `/etc/gitlab/gitlab.rb` for each respective server: @@ -2020,6 +2040,30 @@ running [Prometheus](../monitoring/prometheus/index.md) and retry_join: %w(10.6.0.11 10.6.0.12 10.6.0.13) } + # Configure Prometheus to scrape services not covered by discovery + prometheus['scrape_configs'] = [ + { + 'job_name': 'pgbouncer', + 'static_configs' => [ + 'targets' => [ + "10.6.0.21:9188", + "10.6.0.22:9188", + "10.6.0.23:9188", + ], + ], + }, + { + 'job_name': 'praefect', + 'static_configs' => [ + 'targets' => [ + "10.6.0.131:9652", + "10.6.0.132:9652", + "10.6.0.133:9652", + ], + ], + }, + ] + # Nginx - For Grafana access nginx['enable'] = true ``` diff --git a/doc/administration/reference_architectures/50k_users.md b/doc/administration/reference_architectures/50k_users.md index 98bbfd5dc38192..4121e3ef6f308e 100644 --- a/doc/administration/reference_architectures/50k_users.md +++ b/doc/administration/reference_architectures/50k_users.md @@ -1546,6 +1546,26 @@ On each node: # Recommended to be enabled for improved performance but can notably increase disk I/O # Refer to https://docs.gitlab.com/ee/administration/gitaly/configure_gitaly.html#pack-objects-cache for more info gitaly['pack_objects_cache_enabled'] = true + + # Configure the Consul agent + consul['enable'] = true + ## Enable service discovery for Prometheus + consul['monitoring_service_discovery'] = true + + # START user configuration + # Please set the real values as explained in Required Information section + # + ## The IPs of the Consul server nodes + ## You can also use FQDNs and intermix them with IPs + consul['configuration'] = { + retry_join: %w(10.6.0.11 10.6.0.12 10.6.0.13), + } + + # Set the network addresses that the exporters will listen on for monitoring + node_exporter['listen_address'] = '0.0.0.0:9100' + gitaly['prometheus_listen_addr'] = '0.0.0.0:9236' + # + # END user configuration ``` 1. Append the following to `/etc/gitlab/gitlab.rb` for each respective server: @@ -2116,6 +2136,30 @@ To configure the Monitoring node: retry_join: %w(10.6.0.11 10.6.0.12 10.6.0.13) } + # Configure Prometheus to scrape services not covered by discovery + prometheus['scrape_configs'] = [ + { + 'job_name': 'pgbouncer', + 'static_configs' => [ + 'targets' => [ + "10.6.0.31:9188", + "10.6.0.32:9188", + "10.6.0.33:9188", + ], + ], + }, + { + 'job_name': 'praefect', + 'static_configs' => [ + 'targets' => [ + "10.6.0.131:9652", + "10.6.0.132:9652", + "10.6.0.133:9652", + ], + ], + }, + ] + # Nginx - For Grafana access nginx['enable'] = true ``` diff --git a/doc/administration/reference_architectures/5k_users.md b/doc/administration/reference_architectures/5k_users.md index 4588b6cd5359ae..da4b40b35a5f82 100644 --- a/doc/administration/reference_architectures/5k_users.md +++ b/doc/administration/reference_architectures/5k_users.md @@ -1475,6 +1475,26 @@ On each node: # Recommended to be enabled for improved performance but can notably increase disk I/O # Refer to https://docs.gitlab.com/ee/administration/gitaly/configure_gitaly.html#pack-objects-cache for more info gitaly['pack_objects_cache_enabled'] = true + + # Configure the Consul agent + consul['enable'] = true + ## Enable service discovery for Prometheus + consul['monitoring_service_discovery'] = true + + # START user configuration + # Please set the real values as explained in Required Information section + # + ## The IPs of the Consul server nodes + ## You can also use FQDNs and intermix them with IPs + consul['configuration'] = { + retry_join: %w(10.6.0.11 10.6.0.12 10.6.0.13), + } + + # Set the network addresses that the exporters will listen on for monitoring + node_exporter['listen_address'] = '0.0.0.0:9100' + gitaly['prometheus_listen_addr'] = '0.0.0.0:9236' + # + # END user configuration ``` 1. Append the following to `/etc/gitlab/gitlab.rb` for each respective server: @@ -2020,6 +2040,30 @@ running [Prometheus](../monitoring/prometheus/index.md) and retry_join: %w(10.6.0.11 10.6.0.12 10.6.0.13) } + # Configure Prometheus to scrape services not covered by discovery + prometheus['scrape_configs'] = [ + { + 'job_name': 'pgbouncer', + 'static_configs' => [ + 'targets' => [ + "10.6.0.31:9188", + "10.6.0.32:9188", + "10.6.0.33:9188", + ], + ], + }, + { + 'job_name': 'praefect', + 'static_configs' => [ + 'targets' => [ + "10.6.0.131:9652", + "10.6.0.132:9652", + "10.6.0.133:9652", + ], + ], + }, + ] + # Nginx - For Grafana access nginx['enable'] = true ``` -- GitLab