[Grafana 8] [Unified Alerting] Alerting rules management (duplicating, export, import, ...)

What Grafana version and what operating system are you using?

Grafana v8.3.4 on Linux RPM

What are you trying to achieve?

Unified Alerting with the single user interface to manage all alerts seemed to be a great idea. In reality, when you start using it, you stumble upon a lot of different issues.

What I want to achieve is easy alerting rules management in ine place, but also to be able to “migrate” or “ship” the configured alerting rules between different Grafana instances (we have different Grafana instances for non-prod and prod environments, i.e.)

How are you trying to achieve it?

I try to find specific UI controls for this in the Grafana UI and in its documentation.

What happened?

I am not finding needed functionality.

When I need to create “same” alerts for a different environment, how do I duplicate an alerting rule, so I don’t have to create it from scratch? This functionality seems to be missing?
There is also no “Save as…” functionality while editing an alerting rule, I can only “Save” or “Save and exit” there…

How do I migrate alerting rules between several Grafana instances? I do not see any “export/import” functionality in the user interface.

What did you expect to happen?

I expected that functionality, which seems to be “basic”, when we speak about relatively big projects.

You often have different environments connected to a single Grafana instance, and sometimes there are different Grafana instances. How should the user ship the functionality between environments/instances? It looks like currently the user can do this only manually, every time, for every new alerting rule…

Did you follow any online instructions? If so, what is the URL?

I used only the official Grafana docs.

2 Likes

I also encountered this issue. I was hoping there might be a way to import/export alert rules via JSON, but I haven’t found a way to do that yet.

1 Like

I am looking for the same basic functionality. Since the alerts are no longer associated with dashboards, they also are no longer a part of the JSON config…so where are they and how do we duplicate/edit/back-up?

Alert rule duplication was reported in Alerting: Duplicate Alert rule query and expression · Issue #39431 · grafana/grafana · GitHub as a feature request, however that request was closed assuming that this feature exist (with the ability to copy the alert rule query) although the request was to basically duplicate the entire rule with all its queries and other configurations. I think this functionality is essential for the unified alerting, and hope it will be introduced in the coming releases.

any update on this do they plan to enable provisioning of alerts? Since soon legacy alerting will not be available with next major relase

Any update here? Can anyone confirm if something like the originally requested issue already exists in Grafana 9+?