Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-09-16 21:09:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-09-16 21:09:47 +0300
commitbf1600d157465f9408aace91073954fd5790c054 (patch)
treef317bb99330769c4eb37621c860af014810e554b /lib/gitlab/consul/internal.rb
parent6de7d2c195a8a7fa5702cafa4365f7a9fcac37cd (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/consul/internal.rb')
-rw-r--r--lib/gitlab/consul/internal.rb11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/gitlab/consul/internal.rb b/lib/gitlab/consul/internal.rb
index 8d99ea9f3c0..3afc24ddab9 100644
--- a/lib/gitlab/consul/internal.rb
+++ b/lib/gitlab/consul/internal.rb
@@ -35,19 +35,12 @@ module Gitlab
[service_address, service_port]
end
- def discover_prometheus_uri
+ def discover_prometheus_server_address
service_address, service_port = discover_service(service_name: 'prometheus')
return unless service_address && service_port
- # There really is not a way to discover whether a Prometheus connection is using TLS or not
- # Try TLS first because HTTPS will return fast if failed.
- %w[https http].find do |scheme|
- connection_url = "#{scheme}://#{service_address}:#{service_port}"
- break connection_url if Gitlab::PrometheusClient.new(connection_url, allow_local_requests: true).healthy?
- rescue
- nil
- end
+ "#{service_address}:#{service_port}"
end
private