debian-mirror-gitlab/app/services/metrics/dashboard/system_dashboard_service.rb

34 lines
921 B
Ruby
Raw Normal View History

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,
2020-04-22 19:07:51 +05:30
STAGES::CustomMetricsInserter,
STAGES::CustomMetricsDetailsInserter,
2019-12-04 20:38:33 +05:30
STAGES::EndpointInserter,
2020-04-22 19:07:51 +05:30
STAGES::PanelIdsInserter,
STAGES::Sorter,
STAGES::AlertsInserter
2019-12-04 20:38:33 +05:30
].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