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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
8d37589d
Commit
8d37589d
authored
Nov 16, 2017
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Geo API bug. Statistic is not collected when prometheus is disabled
parent
2cb613d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
app/services/geo/metrics_update_service.rb
app/services/geo/metrics_update_service.rb
+2
-1
app/workers/geo/metrics_update_worker.rb
app/workers/geo/metrics_update_worker.rb
+0
-2
No files found.
app/services/geo/metrics_update_service.rb
View file @
8d37589d
...
...
@@ -24,6 +24,7 @@ module Geo
def
fetch_geo_node_metrics
(
node
)
return
unless
node
.
enabled?
return
unless
Gitlab
::
Geo
.
primary?
||
Gitlab
::
Metrics
.
prometheus_metrics_enabled?
status
=
node_status
(
node
)
...
...
@@ -33,7 +34,7 @@ module Geo
end
update_db_metrics
(
node
,
status
)
if
Gitlab
::
Geo
.
primary?
update_prometheus_metrics
(
node
,
status
)
update_prometheus_metrics
(
node
,
status
)
if
Gitlab
::
Metrics
.
prometheus_metrics_enabled?
end
def
update_db_metrics
(
node
,
status
)
...
...
app/workers/geo/metrics_update_worker.rb
View file @
8d37589d
...
...
@@ -7,8 +7,6 @@ module Geo
LEASE_TIMEOUT
=
5
.
minutes
def
perform
return
unless
Gitlab
::
Metrics
.
prometheus_metrics_enabled?
try_obtain_lease
{
Geo
::
MetricsUpdateService
.
new
.
execute
}
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