rules

package
v0.0.0-...-7e8faac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rule

type Rule struct {
	Record      string            `yaml:"record,omitempty"`
	Alert       string            `yaml:"alert,omitempty"`
	Expr        string            `yaml:"expr"`
	For         model.Duration    `yaml:"for,omitempty"`
	Labels      map[string]string `yaml:"labels,omitempty"`
	Annotations map[string]string `yaml:"annotations,omitempty"`
}

Rule describes an alerting or recording rule.

type RuleGroup

type RuleGroup struct {
	Name     string         `yaml:"name"`
	Interval model.Duration `yaml:"interval,omitempty"`
	Limit    int            `yaml:"limit,omitempty"`
	Rules    []Rule         `yaml:"rules"`
}

RuleGroup is a list of sequentially evaluated recording and alerting rules.

type RuleGroups

type RuleGroups struct {
	Groups []RuleGroup `yaml:"groups"`
}

RuleGroups is a set of rule groups that are typically exposed in a file.

func AddOrUpdate

func AddOrUpdate(alert *naisiov1.Alert) (RuleGroups, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL