Setting up SMTP server for alerting: Grafana and Prometheus

alerting

#1

hey all, so i’m a newbie to grafana/prometheus and i’ve recently configured a grafana dashboard as well as a prometheus server for my external linux host box.
everything works great and i’ve set up alert parameters for my metrics on grafana, however I am very confused as to how to configure emailing an alert to my work email from grafana.

I’ve read a bunch of different documentation and have ended up very confused, so if anyone could clarify this for me that’d be extremely helpful!

  • which files do i edit to add in the SMTP address? the prometheus.yml has a section for alerting and in the same vein custom.ini in grafana has a section for alerting also, so i’m not sure what the difference/importance of each application’s adjustments for SMTP/alerting settings. i’ve been assuming that altering the custom.ini in grafana will send email alerts from grafana and the same case for prometheus, but

  • on the topic of SMTP addresses, if anyone could explain to me/point me to the right direction (e.g. websites/guide recommendations) in terms of configuring this? I want to use a work email that most likely has some sort of proxy settings associated with it. I have little to no idea about SMTP so i’m not sure about the rules for this or what kind of port/host i would need to be using

  • is alertmanager necessary if all i want to do is simply send an email out if a flag is raised (in this case, disk space reaching a certain limit)? i was looking into it but the more i try to understand all of this the more i’m thinking that alertmanager is for a more specialized use.

thank you to anyone that can help me out!!


#2

I struggled with this as well, and this will show you exactly what you need to do: https://youtu.be/U69YYWV7BW0