先上图 看了效果再看步骤
不建议使用qq邮箱接收告警邮件。url请求会被拦截
在/usr/lib/systemd/system/alertmanager.service中加入
--web.external-url='http://ip(或者域名):9093'
如下
在/etc/systemd/system/prometheus.service下加入
--web.external-url='http://ip(或者域名):9090'
这个图 上传码云就显示空白。。反正和上面一样就对啦。
systemctl daemon-reload
# 建议手动杀死 alertmanager alertmanager的进程 否则直接重启可能有问题
systemctl status alertmanager
systemctl restart alertmanager
systemctl status alertmanager
systemctl status prometheus
systemctl restart prometheus
systemctl status prometheus