Documentation
¶
Overview ¶
Package ruler runs Loki's ruler (rule storage, evaluation, alert notification, recording-rule remote write and the rules HTTP API) over runakefli's query engine.
Index ¶
- func Defaults() (lokiruler.Config, rulestore.Config)
- func Enabled(sc rulestore.Config) bool
- func New(ctx context.Context, rc lokiruler.Config, sc rulestore.Config, e Engine, ...) (*rulerbase.Ruler, *rulerbase.API, error)
- func Validate(rc lokiruler.Config, sc rulestore.Config) error
- type Engine
- type Evaluator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Defaults ¶
Defaults returns Loki's ruler and ruler_storage defaults (their flag defaults). rule_path moves from Loki's /rules to rules-temp, relative to the working directory like Loki's default ruler WAL directory (ruler-wal); Loki's single binary moves it under common.path_prefix, which runakefli lacks.
func Enabled ¶
Enabled reports whether the ruler runs: as in Loki's single binary, only when ruler_storage is configured.
func New ¶
func New(ctx context.Context, rc lokiruler.Config, sc rulestore.Config, e Engine, limits *validation.Overrides, logger log.Logger, reg prometheus.Registerer) (*rulerbase.Ruler, *rulerbase.API, error)
New builds Loki's ruler over e, as pkg/loki/modules.go initRulerStorage, initRuleEvaluator (local mode) and initRuler do, plus Loki's ruler HTTP API. The ruler is a dskit service the caller starts and stops. Only one ruler may run per process: Loki keeps its remote-write registry in a package variable.
Types ¶
type Engine ¶
Engine executes a LogQL query; *pushdown.Engine and api.NewPlainQuerier satisfy it (it has api.Querier's method set).