2017-06-06 14:07:33 +00:00
|
|
|
module Gitlab
|
|
|
|
module Prometheus
|
|
|
|
class MetricGroup
|
2017-06-16 12:23:33 +00:00
|
|
|
include ActiveModel::Model
|
2017-05-10 09:25:30 +00:00
|
|
|
|
2017-06-16 12:23:33 +00:00
|
|
|
attr_accessor :name, :priority, :metrics
|
|
|
|
validates :name, :priority, :metrics, presence: true
|
2017-05-10 09:25:30 +00:00
|
|
|
|
2018-02-23 17:58:40 +00:00
|
|
|
def self.common_metrics
|
2017-06-06 14:07:33 +00:00
|
|
|
AdditionalMetricsParser.load_groups_from_yaml
|
|
|
|
end
|
2018-02-23 17:58:40 +00:00
|
|
|
|
|
|
|
# EE only
|
|
|
|
def self.for_project(_)
|
|
|
|
common_metrics
|
|
|
|
end
|
2017-05-10 09:25:30 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|