Versions in this module Expand all Collapse all v1 v1.8.2 Nov 4, 2017 Changes in this version + type Alert struct + ActiveAt model.Time + Annotations model.LabelSet + Labels model.LabelSet + ResolvedAt model.Time + State AlertState + Value model.SampleValue + type AlertState int + const StateFiring + const StateInactive + const StatePending + func (s AlertState) String() string + type AlertingRule struct + func NewAlertingRule(name string, vec promql.Expr, hold time.Duration, lbls, anns model.LabelSet) *AlertingRule + func (r *AlertingRule) ActiveAlerts() []*Alert + func (r *AlertingRule) Eval(ctx context.Context, ts model.Time, engine *promql.Engine, ...) (model.Vector, error) + func (r *AlertingRule) HTMLSnippet(pathPrefix string) html_template.HTML + func (r *AlertingRule) Name() string + func (r *AlertingRule) State() AlertState + func (r *AlertingRule) String() string + type Group struct + func NewGroup(name string, interval time.Duration, rules []Rule, opts *ManagerOptions) *Group + func (g *Group) Eval() + type Manager struct + func NewManager(o *ManagerOptions) *Manager + func (m *Manager) AlertingRules() []*AlertingRule + func (m *Manager) ApplyConfig(conf *config.Config) error + func (m *Manager) Rules() []Rule + func (m *Manager) Run() + func (m *Manager) Stop() + type ManagerOptions struct + Context context.Context + ExternalURL *url.URL + Notifier *notifier.Notifier + QueryEngine *promql.Engine + SampleAppender storage.SampleAppender + type RecordingRule struct + func NewRecordingRule(name string, vector promql.Expr, labels model.LabelSet) *RecordingRule + func (rule RecordingRule) Eval(ctx context.Context, timestamp model.Time, engine *promql.Engine, _ *url.URL) (model.Vector, error) + func (rule RecordingRule) HTMLSnippet(pathPrefix string) template.HTML + func (rule RecordingRule) Name() string + func (rule RecordingRule) String() string + type Rule interface + Eval func(context.Context, model.Time, *promql.Engine, *url.URL) (model.Vector, error) + HTMLSnippet func(pathPrefix string) html_template.HTML + Name func() string + String func() string