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