How to configure Grafana to use a custom SMTP for alerting [Linux]
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.
2. Within the ConfigMap, navigate to the grafana.ini section and add or update the [smtp] settings as follows:
[smtp]
enabled = true
host = smtp.gmail.com:587
user = your_email@gmail.com
password = your_app_passwords
skip_verify = false
from_address = your_email@gmail.com
from_name = GrafanaMore information is here:
https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#smtp
3. Restart the Grafana pod
4. Add your contact point using Grafana UI under:
Alerting => Contact points => Add contact point
You can check supported contact points integrations here:
5. Create your custom notification policy:
Alerting => Notification policy
6. Create your own alert rule:
Alerting => Alert rules => New alert rule
For the test purpose, we created an alert to monitor how much memory is currently used on the node, and if it is more than 30 GB, fire an alert
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.
References/Related Content
https://docs.sisense.com/main/SisenseLinux/monitoring-sisense-on-linux.htm#Grafana
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.