weaveworks / grafanalib

Python library for building Grafana dashboards
Apache License 2.0
1.85k stars 307 forks source link

feat: add grafana v10 AlertRule support #645

Open desmaraisp opened 5 months ago

desmaraisp commented 5 months ago

What does this do?

Grafana v10 has a slightly different format for alert rules, so the v9 version of the class cannot be used without overriding the to_json_data method. The PR implements the modified rendering that should work for grafana v10 alerts

Why is it a good idea?

Supporting v10 will help keeping the library relevant in the short term while cog matures. Once cog become mature enough, it might be an interesting option, but for now manual code changes are still the best way to go forward

Context

See #627

Questions

lexi-k commented 5 months ago

Hi, would it be possible to merge this please? We would also appreciate this change, although it hard to make the change ourselves, having it right in the "main" library would not trigger our "OCDs" as much ;-)

pawel-biegun-sq3 commented 3 months ago

Hi @amotl, would it be possible to merge this? It looks like an essential improvement to support V10 dashboards.

amotl commented 3 months ago

Hi Pawel. I am not a member of the grafanalib project, so I can't help you here. Apologies.

garett-eiq commented 1 month ago

@JamesGibo any chance this might get merged soon? I'd be glad to help out in some way