How to export and import alerts?

Hello,
I had tried to implement some alerting rule in my dashboard. While I am able to export/import the dashboard from my pc to another using .json format; I have found that the alerting rules are never exported in the .json file. I have to redo all the alerting rules from scratch anytime I want to implement the dashboard again or on any other computer.

My questions are if there is any way that I can also export/import the alerting rules along with the dashboard in the Json file.
Or maybe there are ways to export alerting rules through APIs. I have to find documentation regarding it, but I am unable to find any helpful guide or documentation in this regard.

Is the Grafana Alerts feature being updated or enhanced in any way in the future versions? A roadmap would be very helpful.

Thank You.

have a look, may help you.

I have put off moving to the new alerting system for years due to this lack of features and documentation. I am trying yet again but there has been almost no improvement in this area. e.g. there are references to file provisioning using either YAML or JSON but then not a single JSON example or schema reference.

Do you know if there is a way to import alert rules in Grafana cloud?
I have the rules in JSON or YAML format, exported from previous version of Grafana.

Also when you migrate to Grafana Cloud, there should be a way to import alert rules as well.

Has this feature request still not been implemented (import alert rules)?

Hey, Is it possible now to import grafana alert rules?

Not exactly an answer to the original question, but in case you want to import a Mimir, Loki, or Prometheus-style alert rules a into Grafana-managed alert rule, check:

Blog:

Doc: