上次写过一个安装pmm监控mysql的文章,但没有写到告警的配置部分,其实很简单,这些写一下。
docker exec -it 57e88bade14f /bin/bash
vim /etc/grafana/grafana.ini
#################################### SMTP / Emailing ##########################
[smtp]
enabled = true
host = "smtp.mxhichina.com:80"
user = "[email protected]"
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
password = 123456
;cert_file =
;key_file =
;skip_verify = false
from_address = "[email protected]"
from_name = Grafana
[emails]
;welcome_email_on_sign_up = false
如果有错误信息
tail -f /var/log/grafana/grafana.log
最后在WEB界面上测试发送一下。