weaveworks / grafanalib

Python library for building Grafana dashboards
Apache License 2.0
1.86k stars 309 forks source link

fix:unknown NoData state option for alertrulev9 #606

Closed kamilswiec closed 5 months ago

kamilswiec commented 1 year ago

What does this do?

Fixes problem with AlertRuleV9 unknown NoData state option No Data. Details here: https://github.com/weaveworks/grafanalib/issues/601

Why is it a good idea?

It covers important part of alert rule configuration.

Context

I've run into the same issue as: https://github.com/weaveworks/grafanalib/issues/601. Found correct value here: https://github.com/grafana/grafana/blob/6393ef93857d33073147d7f6ee73dcc976d40c25/pkg/services/ngalert/models/alert_rule.go#L62C5-L62C5. Tested it with Grafana version 9.5.2

Questions

I assume we do not want to reuse variables and rather point them out explicitly but not sure about it.