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:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 22:34:23 +0300
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 22:34:23 +0300
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/controllers/metrics_controller.rb
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/controllers/metrics_controller.rb')
-rw-r--r--app/controllers/metrics_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/metrics_controller.rb b/app/controllers/metrics_controller.rb
index c2089a0fca3..1ef1e12bb02 100644
--- a/app/controllers/metrics_controller.rb
+++ b/app/controllers/metrics_controller.rb
@@ -18,9 +18,19 @@ class MetricsController < ActionController::Base
render plain: response, content_type: 'text/plain; version=0.0.4'
end
+ def system
+ render json: system_metrics
+ end
+
private
def metrics_service
@metrics_service ||= MetricsService.new
end
+
+ def system_metrics
+ Gitlab::Metrics::System.summary.merge(
+ worker_id: Prometheus::PidProvider.worker_id
+ )
+ end
end