Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Group ¶
type Group struct { Type datasource.Type `yaml:"type,omitempty"` File string Name string `yaml:"name"` Interval utils.PromDuration `yaml:"interval"` Rules []Rule `yaml:"rules"` Concurrency int `yaml:"concurrency"` // ExtraFilterLabels is a list label filters applied to every rule // request withing a group. Is compatible only with VM datasources. // See https://docs.victoriametrics.com#prometheus-querying-api-enhancements // DEPRECATED: use Params field instead ExtraFilterLabels map[string]string `yaml:"extra_filter_labels"` // Labels is a set of label value pairs, that will be added to every rule. // It has priority over the external labels. Labels map[string]string `yaml:"labels"` // Checksum stores the hash of yaml definition for this group. // May be used to detect any changes like rules re-ordering etc. Checksum string // Optional HTTP URL parameters added to each rule request Params url.Values `yaml:"params"` // Catches all undefined fields and must be empty after parsing. XXX map[string]interface{} `yaml:",inline"` }
Group contains list of Rules grouped into entity with one name and evaluation interval
func (*Group) UnmarshalYAML ¶ added in v1.41.0
UnmarshalYAML implements the yaml.Unmarshaler interface.
type Rule ¶ added in v1.34.4
type Rule struct { ID uint64 Record string `yaml:"record,omitempty"` Alert string `yaml:"alert,omitempty"` Expr string `yaml:"expr"` For utils.PromDuration `yaml:"for"` Labels map[string]string `yaml:"labels,omitempty"` Annotations map[string]string `yaml:"annotations,omitempty"` // Catches all undefined fields and must be empty after parsing. XXX map[string]interface{} `yaml:",inline"` }
Rule describes entity that represent either recording rule or alerting rule.
func (*Rule) UnmarshalYAML ¶ added in v1.37.1
UnmarshalYAML implements the yaml.Unmarshaler interface.
Click to show internal directories.
Click to hide internal directories.