2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# Fetches the system metrics dashboard and formats the output.
|
2020-01-01 13:55:28 +05:30
|
|
|
# Use Gitlab::Metrics::Dashboard::Finder to retrieve dashboards.
|
2019-10-12 21:52:04 +05:30
|
|
|
module Metrics
|
|
|
|
module Dashboard
|
2020-01-01 13:55:28 +05:30
|
|
|
class SystemDashboardService < ::Metrics::Dashboard::PredefinedDashboardService
|
|
|
|
DASHBOARD_PATH = 'config/prometheus/common_metrics.yml'
|
|
|
|
DASHBOARD_NAME = 'Default'
|
2019-10-12 21:52:04 +05:30
|
|
|
|
2019-12-04 20:38:33 +05:30
|
|
|
SEQUENCE = [
|
|
|
|
STAGES::CommonMetricsInserter,
|
|
|
|
STAGES::ProjectMetricsInserter,
|
2020-03-13 15:44:24 +05:30
|
|
|
STAGES::ProjectMetricsDetailsInserter,
|
2019-12-04 20:38:33 +05:30
|
|
|
STAGES::EndpointInserter,
|
|
|
|
STAGES::Sorter
|
|
|
|
].freeze
|
|
|
|
|
2019-10-12 21:52:04 +05:30
|
|
|
class << self
|
|
|
|
def all_dashboard_paths(_project)
|
|
|
|
[{
|
2020-01-01 13:55:28 +05:30
|
|
|
path: DASHBOARD_PATH,
|
|
|
|
display_name: DASHBOARD_NAME,
|
2019-12-26 22:10:19 +05:30
|
|
|
default: true,
|
|
|
|
system_dashboard: true
|
2019-10-12 21:52:04 +05:30
|
|
|
}]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2019-12-04 20:38:33 +05:30
|
|
|
|
|
|
|
Metrics::Dashboard::SystemDashboardService.prepend_if_ee('EE::Metrics::Dashboard::SystemDashboardService')
|