diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2015-12-28 13:14:48 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2015-12-28 13:14:48 +0100 |
commit | 1be5668ae0e663015d384ea7d8b404f9eeb5b478 (patch) | |
tree | 48a4345a60fd6d1cc65151ae6ae69b371591342c | |
parent | db7bbadf95d9f2266a055ee50a67fa895b0f21a9 (diff) | |
download | gitlab-ce-1be5668ae0e663015d384ea7d8b404f9eeb5b478.tar.gz |
Added host option for InfluxDBinfluxdb
-rw-r--r-- | config/gitlab.yml.example | 1 | ||||
-rw-r--r-- | lib/gitlab/metrics.rb | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example index 24f3f6f02dc..acfc86bf4d1 100644 --- a/config/gitlab.yml.example +++ b/config/gitlab.yml.example @@ -422,6 +422,7 @@ production: &base # Ban an IP for one hour (3600s) after too many auth attempts # bantime: 3600 metrics: + host: localhost enabled: false # The name of the InfluxDB database to store metrics in. database: gitlab diff --git a/lib/gitlab/metrics.rb b/lib/gitlab/metrics.rb index ce89be636d3..d6f60732455 100644 --- a/lib/gitlab/metrics.rb +++ b/lib/gitlab/metrics.rb @@ -52,11 +52,12 @@ module Gitlab # "@foo ||= bar" is _not_ thread-safe. if enabled? @pool = ConnectionPool.new(size: pool_size, timeout: timeout) do + host = Settings.metrics['host'] db = Settings.metrics['database'] user = Settings.metrics['username'] pw = Settings.metrics['password'] - InfluxDB::Client.new(db, username: user, password: pw) + InfluxDB::Client.new(db, host: host, username: user, password: pw) end end end |