grafana-operator icon indicating copy to clipboard operation
grafana-operator copied to clipboard

Unified Alerting - implement a CRD for Grafana 8 Alert Rules, Alert Groups, Contact Points, and Notification Policies

Open apryor6 opened this issue 3 years ago • 7 comments

Is your feature request related to a problem? Please describe. No existing problem.

Describe the solution you'd like Unified Alerting is a great new feature, but the current grafana-controller does not support a CRD definition for the decoupled alerts, contact points (like a Notification Channel), and notification policies. The desired solution would be CRDs for each of these so that the new alerting tools are equally accessible via yaml.

kind: GrafanaAlertRule kind: GrafanaAlertGroup kind: GrafanaContactPoint kind: GrafanaNotificationPolicy

Describe alternatives you've considered A workaround being considered is to manually mount the relevant config files into the running container via VolumeMount from a ConfigMap containing raw file contents. The only other alternative I am aware of is to manually enter these into the Grafana web console, which isn't the point.

Additional context Attached are screenshots of the relevant web console screens being referenced.

Screen Shot 2021-10-12 at 10 38 41 AM Screen Shot 2021-10-12 at 10 38 52 AM Screen Shot 2021-10-12 at 10 41 25 AM

Existing solutions If applicable please provide a link to an existing solution from a different project

apryor6 avatar Oct 12 '21 14:10 apryor6

Work ongoing in https://github.com/grafana-operator/grafana-operator/pull/559

NissesSenap avatar Oct 19 '21 11:10 NissesSenap

@NissesSenap @apryor6 how are those CRD's interacting with e.g. prometheus-operator/AlertmanagerConfig.

Cellebyte avatar Nov 09 '21 15:11 Cellebyte

So after #559 got merged it's now possible to use unified alerting in the operator but we have no way to manage the config.

As pointed out by @apryor6 it would be nice to create a few new CRD:s to manage the new API. To move this issue forward we would need a CRD design. I have created a design example to manage organizations: https://github.com/grafana-operator/grafana-operator/pull/615, it would be good to have a similar design document for this issue. Is there any one that would be willing to start working on a design document? Just because you create the design it dosent mean today you have to implement the solution.

And as @Cellebyte points out should any on these new CRD:s be compatible with the Prometheus operator?

Would any one be willing to drive this forward?

NissesSenap avatar Nov 28 '21 12:11 NissesSenap

Any news on this? Or is this planned for Grafana 9?

R-Studio avatar May 12 '22 12:05 R-Studio

I think that @apryor6 might have started to look in to a design proposal but I'm not sure. If you are willing to take a stab at a design document @R-Studio that would be great.

NissesSenap avatar May 12 '22 13:05 NissesSenap

@NissesSenap Unfortunately, I don't think I have enough skills/experience to create a design document for this. (I've only been using Kubernetes/Container for 2 months😆)

R-Studio avatar May 16 '22 06:05 R-Studio

Any updates? 👀

R-Studio avatar Sep 19 '22 11:09 R-Studio

Unified Alerting have been deprecated in grafana 9 and grafana alerting https://grafana.com/docs/grafana/latest/alerting/ is now the name of the game. https://grafana.com/blog/2021/06/14/the-new-unified-alerting-system-for-grafana-everything-you-need-to-know

This feature won't be implemented due to this. Since it's a allot of work and maintenance to take on a new controller. If you want grafana alerting CRD:s please create a new issue.

NissesSenap avatar Oct 18 '22 20:10 NissesSenap

Apologies for not commenting recently. There's been no work done by me to create a design document. I'd really like to - it's purely been competing personal and professional priorities that make it hard.

IMO the approach would be to take the Grafana config spec for unified alerts and one-by-one capture those in the appropriate yaml spec. I understand from the Grafana team that by now there is full API support on the Grafana side for these, so surely it becomes viable to implement within the operator?

apryor6 avatar Jan 05 '23 15:01 apryor6