2017-09-10 17:25:29 +05:30
|
|
|
module Gitlab
|
|
|
|
module Prometheus
|
|
|
|
class MetricGroup
|
|
|
|
include ActiveModel::Model
|
|
|
|
|
|
|
|
attr_accessor :name, :priority, :metrics
|
|
|
|
validates :name, :priority, :metrics, presence: true
|
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
def self.common_metrics
|
2017-09-10 17:25:29 +05:30
|
|
|
AdditionalMetricsParser.load_groups_from_yaml
|
|
|
|
end
|
2018-03-27 19:54:05 +05:30
|
|
|
|
|
|
|
# EE only
|
|
|
|
def self.for_project(_)
|
|
|
|
common_metrics
|
|
|
|
end
|
2017-09-10 17:25:29 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|