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:
-
Have your admin temporarily drop the alert YAML file on the server so Grafana loads them.
-
Have the admin delete that file from the server disk and restart Grafana.
-
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.
-
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!