Editing provisioned notification policies

  • What Grafana version and what operating system are you using?

Grafana 10.3.1 in kubernetes

  • What are you trying to achieve?

Have notification policies and alerts that are editable in the UI but saved into our git repo, thus allowing our DevOps guys to be able to rebuild our Grafana instance without loosing anything.

  • How are you trying to achieve it?

I created several alerts and notification policies in the UI. We have an exporter script that pulled them out via the API and saved them into our github repo that houses are ArgoCD apps. On merge Argo redeploys and the change is persisted.

  • What happened?

Everything worked great. Until I went back to edit the alerts and notification policies but now they are marked as provisioned and can’t be edited. This happened with dashboards too, we just had to add “editable: true” to the dashboards and they worked fine. I tried adding “editable: true” to various locations in the alerts and notification policies but these didn’t change anything:

    apiVersion: 1
    editable: true
    policies:
        - orgId: 1
          editable: true
          receiver: Grafana Alerts Default
          group_by:
            - grafana_folder
            - alertname
  • What did you expect to happen?

Like with data sources, contact points, and dashboards, we would be able to edit our provisioned notification policies and alerts even after they have been provisioned.

  • Can you copy/paste the configuration(s) that you are having problems with?

An Alert snippet:

    groups:
      - orgId: 1
        rules:
        - orgId: 1
          editable: true
          name: Every 5 minutes
          folder: Delta
          interval: 5m
          rules: ...
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

No, everything imported fine.

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

A lot of guidance has come from here: Provision Grafana | Grafana documentation
And various other places in documentation but I’ve not found anything specifically pertaining to notification policies and alerts.