Change Email Alert Template in Kubernetes Environment

I am using Grafana to monitor my own project in kubernetes. I want to send an email notification when an alert is triggered. To do that I have create a configmap which is grafana-config.yaml whose content is like following:

**root@latif:~# cat grafana-config.yaml**
# Source: robomotion/templates/grafana-configmap.yaml
apiVersion: v1
kind: ConfigMap
  name: grafana-ini-config
  grafana.ini: |-
    root_url = /api/monitoring
    serve_from_sub_path = true

    enabled = true

    disable_login_form = true

    allow_embedding = true

    from_name=Robomotion Alert Manager

When I use kubectl apply -f grafana-config.yaml and restart grafana pod, I can see the mails with the given settings. But in the received mails, there is a specific template to Grafana. I want to edit the template. When I search it, there is an html file for email template in public folder. How can I edit the html file in kubernetes environment and apply the new html file for sending the emails with my edited templates


Hi @latif1

This isn’t the greatest answer but I do believe that email templating is available with the new Unified Alerting feature that was released with Grafana 8. That feature is still behind a feature-toggle until it is a bit more stable, but I would check it out:

docker run -p 3000:3000 --name=grafana -e “GF_FEATURE_TOGGLES_ENABLE=ngalert” grafana/grafana:8.0.2