Documentation ¶
Index ¶
- Constants
- func ForStateMetric(base labels.Labels, alertName string) labels.Labels
- func MemstoreTenantManager(cfg ruler.Config, engine *logql.Engine, overrides RulesLimits) ruler.ManagerFactory
- func MultiTenantManagerAdapter(mgr ruler.MultiTenantManager) ruler.MultiTenantManager
- func ValidateGroups(grps ...rulefmt.RuleGroup) (errs []error)
- type GroupLoader
- type MemStore
- type Metrics
- type MultiTenantManager
- type NoopAppender
- type RuleCache
- type RuleIter
- type RulesLimits
Constants ¶
View Source
const (
AlertForStateMetricName = "ALERTS_FOR_STATE"
)
Variables ¶
This section is empty.
Functions ¶
func MemstoreTenantManager ¶
func MemstoreTenantManager( cfg ruler.Config, engine *logql.Engine, overrides RulesLimits, ) ruler.ManagerFactory
func MultiTenantManagerAdapter ¶
func MultiTenantManagerAdapter(mgr ruler.MultiTenantManager) ruler.MultiTenantManager
MultiTenantManagerAdapter will wrap a MultiTenantManager which validates loki rules
func ValidateGroups ¶
Types ¶
type GroupLoader ¶
type GroupLoader struct{}
func (GroupLoader) Load ¶
func (g GroupLoader) Load(identifier string) (*rulefmt.RuleGroups, []error)
type MemStore ¶
type MemStore struct {
// contains filtered or unexported fields
}
func NewMemStore ¶
func (*MemStore) Querier ¶
implement storage.Queryable. It is only called with the desired ts as maxtime. Mint is parameterized via the outage tolerance, but since we're synthetically generating these, we only care about the desired time.
type Metrics ¶
type Metrics struct { Evaluations *prometheus.CounterVec Samples prometheus.Gauge // in memory samples CacheHits *prometheus.CounterVec // cache hits on in memory samples }
func NewMetrics ¶
func NewMetrics(r prometheus.Registerer) *Metrics
type MultiTenantManager ¶
type MultiTenantManager struct {
ruler.MultiTenantManager
}
MultiTenantManager wraps a cortex MultiTenantManager but validates loki rules
func (*MultiTenantManager) ValidateRuleGroup ¶
func (m *MultiTenantManager) ValidateRuleGroup(grp rulefmt.RuleGroup) []error
ValidateRuleGroup validates a rulegroup
type NoopAppender ¶
type NoopAppender struct{}
func (NoopAppender) Commit ¶
func (a NoopAppender) Commit() error
func (NoopAppender) Rollback ¶
func (a NoopAppender) Rollback() error
type RuleCache ¶
type RuleCache struct {
// contains filtered or unexported fields
}
func NewRuleCache ¶
func (*RuleCache) CleanupOldSamples ¶
CleanupOldSamples removes samples that are outside of the rule's `For` duration.
type RuleIter ¶
type RuleIter interface {
AlertingRules() []*rules.AlertingRule
}
type RulesLimits ¶
RulesLimits is the one function we need from limits.Overrides, and is here to limit coupling.
Click to show internal directories.
Click to hide internal directories.