alertmanager+webhook发报警邮件(使用587端口)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了alertmanager+webhook发报警邮件(使用587端口)相关的知识,希望对你有一定的参考价值。

alertmanager+webhook发报警邮件(使用587端口):

webhook安装:

go get github.com/prometheus/alertmanager/examples/webhook

启动webhook(默认端口为TCP 5001):

go/bin/webhook

webhookmail.py下载网址(需要手动复制其内容):

https://github.com/youerning/blog/tree/master/prometheus

使用(需要先安装falcon python模块,步骤略):

vi webhookmail.py

改下里面的邮箱配置,smtp端口使用的587,最后的服务端口可以改为5002(默认为80),ip为127.0.0.1(默认为0.0.0.0)

python webhookmail.py

vi alertmanager/alertmanager.yml

调整web.hook的url为http://127.0.0.1:5002/(默认为5001)

启动alertmanager

./alertmanager/alertmanager --config-file=./alertmanager/alertmanager.yml

以上是关于alertmanager+webhook发报警邮件(使用587端口)的主要内容,如果未能解决你的问题,请参考以下文章

alertmanager 基于webhook-adapter插件实现企业微信机器人提醒服务

alertmanager 基于webhook-adapter插件实现企业微信机器人提醒服务

alertmanager 基于webhook-adapter插件实现企业微信机器人提醒服务

linux(centos8):prometheus使用alertmanager发送报警邮件(prometheus 2.18.1/alertmanager 0.20.0)

linux(centos8):prometheus使用alertmanager发送报警邮件(prometheus 2.18.1/alertmanager 0.20.0)

webhook