grafana/loki

Feature request: Loki alert rule tests

Open

#7,655 opened on Nov 10, 2022

View on GitHub
 (15 comments) (26 reactions) (0 assignees)Go (3,997 forks)batch import
component/logclihelp wantedtype/feature

Repository metrics

Stars
 (28,187 stars)
PR merge metrics
 (Avg merge 5d 20h) (522 merged PRs in 30d)

Description

Is your feature request related to a problem? Please describe. When making prometheus alert or recording rules, there's a system to test them. Making Loki alert or recording rules is frustrating since there's no clear testing system.

Describe the solution you'd like I'd like a system for Loki that mirrors the prometheus system described at https://prometheus.io/docs/prometheus/latest/configuration/unit_testing_rules/.

Describe alternatives you've considered Keeping things in prometheus as much as possible, so promtool test can be used. Making Loki recording rules only if possible.

Additional context This could potentially be a loki tool, or some kind of cortextool extension?

Contributor guide