Need a UI "Import" button for native Grafana Alerts (File provisioning locks some of us out)

Hey everyone,

Using Grafana v13.0.1.

I work in a strict fintech environment where my team has zero access to the backend servers. We can’t use SSH or run API commands; we have to do everything through the Grafana web browser.

Right now, migrating alerts between different Grafana instances is a huge headache. It is super easy to export an alert rule from the UI, but there is absolutely no way to import that rule into another instance using the UI. (Dashboards have a simple “Import” button, why don’t alerts?)

If we ask our server admins to manually load the alert files onto the backend folder, Grafana puts a “Provisioned” lock on them. This means we can’t edit our own alerts in the browser, which sucks. If the file stays on the disk, the UI completely blocks you from even deleting them.

The Workaround I Discovered If you are stuck in a locked-down environment, I found a weird trick to get around the file lock and force Grafana to hand ownership back to the UI:

  1. Have your admin temporarily drop the alert YAML file on the server so Grafana loads them.

  2. Have the admin delete that file from the server disk and restart Grafana.

  3. The alerts will still be visible in Grafana, but because the backend file is gone, Grafana will finally let you hit Delete in the UI.

  4. Go ahead and delete them, then immediately switch over to the “Recently deleted” tab and hit Restore.

Once they restore, Grafana completely forgets they ever came from a backend file. The provisioned lock vanishes, and they are 100% editable in the browser!

While this trick is a total lifesaver, it’s a crazy amount of gymnastics just to move alerts from staging to prod. It would be amazing if the we could just add an “Import Alert” button in the web UI that lets us paste our JSON/YAML directly, just like we do with dashboards.

By the way, I’m pretty new to software development and would like to contribute to the project. If someone could point me in the right direction or provide me some easy or boring tasks, I’d love to contribute and help out!

Keep in mind that UI is also using API under the hood, so

  1. you can enable java script in the dashboards (make sure you are aware of security consequences) and use javascript to build own ui/functionality (export/import from file, validations,…), which will use standard API under the hood. Example: exporting of all dashboards from the dashboard GitHub - monitoringartist/grafana-utils: Grafana 5+ utils · GitHub
    It should piece of cake for LLM with right prompt.

  2. Next level will be that you will write complete Grafana plugin in the same way Get started | Grafana Plugin Tools

Your implementation may disable provenance and then you will be able to edit alerts also from the ui

Related FR here: Import/Export alert rule in UI. · Issue #73437 · grafana/grafana · GitHub