thanosrule

package
v0.13.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertingRule

type AlertingRule struct {
	*rules.AlertingRule
	PartialResponseStrategy storepb.PartialResponseStrategy
}

type Group

type Group struct {
	*rules.Group

	PartialResponseStrategy storepb.PartialResponseStrategy
	// contains filtered or unexported fields
}

func (Group) OriginalFile added in v0.9.0

func (g Group) OriginalFile() string

type Manager added in v0.9.0

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager added in v0.9.0

func NewManager(dataDir string) *Manager

func (*Manager) AlertingRules added in v0.9.0

func (m *Manager) AlertingRules() []AlertingRule

func (*Manager) RuleGroups added in v0.9.0

func (m *Manager) RuleGroups() []Group

func (*Manager) SetRuleManager added in v0.9.0

func (m *Manager) SetRuleManager(s storepb.PartialResponseStrategy, mgr *rules.Manager)

func (*Manager) Update added in v0.9.0

func (m *Manager) Update(evalInterval time.Duration, files []string) error

Update updates rules from given files to all managers we hold. We decide which groups should go where, based on special field in RuleGroup file.

type PromRuleGroup added in v0.13.0

type PromRuleGroup struct {
	Name     string         `yaml:"name"`
	Interval model.Duration `yaml:"interval,omitempty"`
	Rules    []rulefmt.Rule `yaml:"rules"`
}

PromRuleGroup is a list of sequentially evaluated recording and alerting rules. This is a modified version from Prometheus. In Prometheus they shifted to using yaml.Node as elements which gives problems in marshal/unmarshal. Hence this replaces the yaml.Node to strings.

type PromRuleGroups added in v0.13.0

type PromRuleGroups struct {
	Groups []PromRuleGroup `yaml:"groups"`
}

type RuleGroup

type RuleGroup struct {
	PromRuleGroup
	PartialResponseStrategy *storepb.PartialResponseStrategy
}

func (RuleGroup) MarshalYAML

func (r RuleGroup) MarshalYAML() (interface{}, error)

func (*RuleGroup) UnmarshalYAML

func (r *RuleGroup) UnmarshalYAML(unmarshal func(interface{}) error) error

type RuleGroups

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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