2019-12-17 07:08:11 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Metrics
|
|
|
|
module Dashboard
|
|
|
|
class PodDashboardService < ::Metrics::Dashboard::PredefinedDashboardService
|
|
|
|
DASHBOARD_PATH = 'config/prometheus/pod_metrics.yml'
|
2020-08-04 20:09:52 -04:00
|
|
|
DASHBOARD_NAME = N_('K8s pod health')
|
2020-07-16 17:10:05 -04:00
|
|
|
|
|
|
|
# SHA256 hash of dashboard content
|
2020-08-07 11:10:17 -04:00
|
|
|
DASHBOARD_VERSION = '3a91b32f91b2dd3d90275333c0ea3630b3f3f37c4296ede5b5eef59bf523d66b'
|
2020-08-04 20:09:52 -04:00
|
|
|
|
|
|
|
SEQUENCE = [
|
|
|
|
STAGES::MetricEndpointInserter,
|
|
|
|
STAGES::VariableEndpointInserter,
|
2020-08-12 08:10:25 -04:00
|
|
|
STAGES::PanelIdsInserter
|
2020-08-04 20:09:52 -04:00
|
|
|
].freeze
|
|
|
|
|
|
|
|
class << self
|
|
|
|
def all_dashboard_paths(_project)
|
|
|
|
[{
|
|
|
|
path: DASHBOARD_PATH,
|
|
|
|
display_name: _(DASHBOARD_NAME),
|
|
|
|
default: false,
|
|
|
|
system_dashboard: false,
|
|
|
|
out_of_the_box_dashboard: out_of_the_box_dashboard?
|
|
|
|
}]
|
|
|
|
end
|
|
|
|
end
|
2020-07-16 17:10:05 -04:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def dashboard_version
|
|
|
|
DASHBOARD_VERSION
|
|
|
|
end
|
2019-12-17 07:08:11 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|