Configure email for Alerting
Use the Grafana Alerting - email integration to send email notifications when your alerts are firing. An email is sent when an alert fires and when an alert gets resolved.
Before you begin
Note
This section is for Grafana OSS only. For Grafana Cloud, SMTP configuration is not required.
For Grafana OSS, you enable email notifications by first configuring SMTP settings in the Grafana configuration settings.
SMTP configuration
Access the configuration file.
Locate the Grafana configuration file. This file is typically named
grafana.ini
orcustom.ini
and is located in theconf
directory within the Grafana installation directory.Open the configuration file:
Open the configuration file using a text editor.
Locate SMTP settings section.
Search for the SMTP settings section in the configuration file. It starts with
[smtp]
.Configure SMTP settings.
Within the
[smtp]
settings section, specify the following parameters:enabled = true
: Enables SMTP.host
: The hostname or IP address of your SMTP server, and the port number of your SMTP server (commonly 25, 465, or 587). Default islocalhost:25
.user
: Your SMTP username (if authentication is required).password
: Your SMTP password (if authentication is required).from_address
: The email address from which Grafana notifications will be sent.from_name
: The name associated with the from_address.skip_verify = true
: Skip SSL/TLS certificate verification (useful for testing, but not recommended for production).
Save and close the configuration file.
After configuring the SMTP settings, save the changes to the configuration file and close the text editor.
Restart Grafana.
Restart the Grafana service to apply the changes made to the configuration file. The method for restarting Grafana depends on your operating system and how Grafana was installed (e.g.,
systemctl restart grafana-server
for systems using systemd).Test email notifications.
After restarting Grafana, test the email notification functionality by creating an email contact point.
Procedure
To set up email integration, complete the following steps.
- Navigate to Alerts & IRM -> Alerting -> Contact points.
- Click + Add contact point.
- Enter a contact point name.
- From the Integration list, select Email.
- Enter the email addresses you want to send notifications to.
- Click Test to check that your integration works.
- Click Save contact point.
Next steps
To add the contact point and integration you created to your default notification policy, complete the following steps.
- Navigate to Alerts & IRM -> Alerting -> Notification policies.
- In the Default policy, click the ellipsis icon (…) and then Edit.
- Change the default policy to the contact point you created.
- Click Update default policy.
Note
If you have more than one contact point, add a new child notification policy rather than edit the default one, so you can route specific alerts to one or multiple email addresses.
Was this page helpful?
Related resources from Grafana Labs
![Getting started with the Grafana LGTM Stack](/static/assets/featured/getting-started-with-grafana-lgtm-stack-amer_featured.png?w=200 200w, /static/assets/featured/getting-started-with-grafana-lgtm-stack-amer_featured.png?w=400 400w)
![Intro to Kubernetes monitoring in Grafana Cloud](/media/webinar/Screenshot-2024-02-12-at-4.09.30-PM.png?w=200 200w, /media/webinar/Screenshot-2024-02-12-at-4.09.30-PM.png?w=400 400w)
![Building advanced Grafana dashboards](/media/webinar/AMER_buildadv_notxt.png?w=200 200w, /media/webinar/AMER_buildadv_notxt.png?w=400 400w)