Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
gitlab-ce
Commits
1be5668a
Commit
1be5668a
authored
Dec 28, 2015
by
Yorick Peterse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added host option for InfluxDB
parent
db7bbadf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
config/gitlab.yml.example
config/gitlab.yml.example
+1
-0
lib/gitlab/metrics.rb
lib/gitlab/metrics.rb
+2
-1
No files found.
config/gitlab.yml.example
View file @
1be5668a
...
...
@@ -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
...
...
lib/gitlab/metrics.rb
View file @
1be5668a
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment