Load new alerts from (json) file

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

  • What are you trying to achieve?
    Load on docker up alerts

  • How are you trying to achieve it?
    I use a docker-compose file to build up my monitoring setup. Therefore I have a folder with json dashboards and grafana.ini and prometheus.ini etc… These files and folders are mounted to the docker setup.
    Now I created alarms but when I switch e.g my monitoring machine or clear grafana settings with docker-compose down -v the alerts are removed.

  • What did you expect to happen?
    I expect exactly this, but asking for a way to mount an alert.json or folder to read in alerts on docker-compose up.
    Looking for a way to persist the alerts. I’m backuping the whole setup on my private git.

Thanks

did you got how solve it?

Sorry for the late answer. Yes I think with Grafana 9 you can configure alerts, contactpoint and alert templates in yaml files and have it on startup. I have it in my provisioning folder as alerting folder