How to configure Grafana to use a custom SMTP for alerting [Linux]
In this guide, we will walk you through the process of enabling alert notifications in Grafana using Gmail's SMTP service. Setting up email alerts ensures that you are promptly informed of any significant events or issues within your Grafana dashboards. To securely send emails through Gmail, we'll be using Google “App Passwords,” which requires enabling 2-factor authentication on your Google account.
Prerequisites
Before you begin, ensure you have the following:
Access to the Kubernetes cluster where Sisense is deployed.
A Google account with 2-factor authentication enabled.
A Google “App Password” generated specifically for Grafana.
Step-by-Step Guide:
1. Update the sisense-grafana ConfigMap to define your SMTP settings.
kubectl -n sisense edit cm sisense-grafana
2. Within the ConfigMap, navigate to the grafana.ini section and add or update the [smtp] settings as follows:
Under Configure notifications, please select the contact point that was created earlier.
Note: Changes to the ConfigMap will be overwritten during each upgrade. Therefore, you will need to re-add the [smtp] section after every upgrade.
Conclusion
Updating the Grafana ConfigMap with your SMTP settings can help you monitor your environment and receive timely notifications about resource usage, system health, or critical events, allowing you to respond proactively and maintain service reliability.
Disclaimer: This post outlines a potential custom workaround for a specific use case or provides instructions regarding a specific task. The solution may not work in all scenarios or Sisense versions, so we strongly recommend testing it in your environment before deployment. If you need further assistance with this, please let us know.