Grafana 配置告警

发布时间:2023年12月27日

配置告警

配置告警

1. Grafana 配置文件配置

#################################### SMTP / Emailing ##########################
[smtp]
enabled = true
host = smtp.qq.com:587
user = 9**@qq.com
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
password = 邮箱授权码
;cert_file =
;key_file =
;skip_verify = false
# 发件人地址必须与授权地址相同
from_address = 9**@qq.com
from_name = Grafana
# EHLO identity in SMTP dialog (defaults to instance_name)
;ehlo_identity = dashboard.example.com
# SMTP startTLS policy (defaults to 'OpportunisticStartTLS')
;startTLS_policy = NoStartTLS

2. Grafana 页面配置

在 Grafana 的侧边栏中,将鼠标悬停在警报(铃铛)图标上,然后单击“联系点” Contact point。

点击 + 添加联系点 add Contact point。

在“名称” name 中,自定义名字。

在 Integration (集成) 中,选择 Webhook (Webhook)。

在 URL 中,将终结点粘贴到请求箱中。

单击“测试”将测试警报发送到请求箱。

导航回之前创建的请求箱。在左侧,现在有一个条目。单击它以查看 Grafana 发送了哪些信息。POST /

返回到 Grafana,然后单击保存联系点。

在这里插入图片描述
在这里插入图片描述

# 版本 grafana-enterprise-10.2.3-1.x86_64.rpm

# https://grafana.com/tutorials/grafana-fundamentals/?utm_source=grafana_gettingstarted#add-an-alert-rule-to-grafana
文章来源:https://blog.csdn.net/qq_44659804/article/details/135253179
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。