Prometheus 实践操作

编程入门 行业动态 更新时间:2024-10-26 14:35:25

Prometheus 实践<a href=https://www.elefans.com/category/jswz/34/1770947.html style=操作"/>

Prometheus 实践操作

Prometheus-webhook

Prometheus-webhook 下载

**下载成功后将压缩包丢到服务器解压,使用mv重命名 **

tar -zxvf prometheus-webhook-dingtalk-2.1.0.linux-amd64.tar.gz
mv prometheus-webhook-dingtalk-2.1.0.linux-amd64.tar.gz prometheus-webhook-dingtalk

配置系统启动服务

vim /etc/systemd/system/prometheus-webhook.service

[Unit]
Description=Prometheus Dingding Webhook
[Service]
ExecStart=/opt/prometheus-webhook/prometheus-webhook-dingtalk --config.file=/opt/prometheus-webhook/config.yml
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
[Install]
WantedBy=multi-user.target

ExecStart解压后的目录

钉钉告警 prometheus-webhook/config.yml 配置信息

#告警信息模板 和alertmanager.yml 的模板取同一个
templates:- /.../*.tmpl
targets:#配置webhook,此处webhook1是alertmanager配置文件中访问钉钉的地址后缀参数webhook1:#钉钉机器人 群组webhook地址,需自行生成url: =xxxxxxxx#密签secret: xxxxxxxxmessage:title: '{{ template "ops.title" . }}'text: '{{ template "ops.content" . }}'

需要在钉钉群组里面添加一个webhook自定义机器人用来接收alert推送的告警消息




更多推荐

Prometheus 实践操作

本文发布于:2024-03-09 08:49:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1724518.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:操作   Prometheus

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!