2020-01-01 13:55:28 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Metrics
|
|
|
|
module Dashboard
|
|
|
|
class PodDashboardService < ::Metrics::Dashboard::PredefinedDashboardService
|
|
|
|
DASHBOARD_PATH = 'config/prometheus/pod_metrics.yml'
|
2020-10-24 23:57:45 +05:30
|
|
|
DASHBOARD_NAME = N_('K8s pod health')
|
2020-07-28 23:09:34 +05:30
|
|
|
|
|
|
|
# SHA256 hash of dashboard content
|
2020-10-24 23:57:45 +05:30
|
|
|
DASHBOARD_VERSION = '3a91b32f91b2dd3d90275333c0ea3630b3f3f37c4296ede5b5eef59bf523d66b'
|
|
|
|
|
|
|
|
SEQUENCE = [
|
|
|
|
STAGES::MetricEndpointInserter,
|
|
|
|
STAGES::VariableEndpointInserter,
|
|
|
|
STAGES::PanelIdsInserter
|
|
|
|
].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-28 23:09:34 +05:30
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def dashboard_version
|
|
|
|
DASHBOARD_VERSION
|
|
|
|
end
|
2020-01-01 13:55:28 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|