Class: Kube::Cluster::Standard::VictoriaMetrics::VMRule
- Inherits:
-
Object
- Object
- Kube::Cluster::Standard::VictoriaMetrics::VMRule
- Defined in:
- lib/kube/cluster/standard/victoria_metrics/vm_rule.rb
Overview
A VMRule CR: a set of rule Groups evaluated by VictoriaMetrics.
VMRule.new(name: "node", groups: [
Group.new("node.rules") { ... },
])
Instance Method Summary collapse
-
#initialize(name:, groups:, &block) ⇒ VMRule
constructor
A new instance of VMRule.
Constructor Details
#initialize(name:, groups:, &block) ⇒ VMRule
Returns a new instance of VMRule.
76 77 78 79 80 81 82 |
# File 'lib/kube/cluster/standard/victoria_metrics/vm_rule.rb', line 76 def initialize(name:, groups:, &block) super() { .name = name spec.groups = groups.map(&:to_h) instance_exec(&block) if block } end |