当前位置: 首页 > article >正文

K8S学习之基础四十:K8S配置altermanager发送告警到钉钉群

配置altermanager发送告警到钉钉群

​ 创建钉钉群,设置机器人助手(必须是管理员才能设置),获取webhook
在这里插入图片描述
webhook:

https://oapi.dingtalk.com/robot/send?access_token=25bed933a52d69f192347b5be4b2193bc0b257a6d9ae68d81619e3ae3d93f7c6

# 创建cm,配置钉钉群信息
vi alertmanager-cm-dintalk.yaml
kind: ConfigMap
apiVersion: v1
metadata:
  name: alertmanager
  namespace: monitor-sa
data:
  alertmanager.yml: |-
    global:
      resolve_timeout: 1m
      smtp_smarthost: 'smtp.163.com:25'
      smtp_from: '18937120061@163.com'
      smtp_auth_username: '18937120061@163.com'
      smtp_auth_password: '*'  # 163邮箱
      smtp_require_tls: false
    route:
      group_by: [alertname]
      group_wait: 10s
      group_interval: 10s
      repeat_interval: 10m
      receiver: cluster1  # 对应接收名称
    receivers:
    - name: cluster1  # 接收名称
      webhook_configs:
      - url: 'http://172.16.80.131:8060/dingtalk/cluster1/send'    # 程序所在服务器路径
        send_resolved: true
# 启动程序,替换access_token为上面的webhook
nohup ./prometheus-webhook-dingtalk --web.listen-address="0.0.0.0:8060" --ding.profile="cluster1=https://oapi.dingtalk.com/robot/send?access_token=25bed933a52d69f192347b5be4b2193bc0b257a6d9ae68d81619e3ae3d93f7c6" &

​ 钉钉群能正常收到告警
在这里插入图片描述


http://www.kler.cn/a/594102.html

相关文章:

  • SpringCache @Cacheable 在同一个类中调用方法,导致缓存不生效的问题及解决办法
  • Springboot项目搭建(9)-分页与文件上传
  • 论文阅读——高光谱与多光谱图像融合:通过自监督表示实现任意分辨率
  • 用爬虫解锁 Shopee 店铺商品数据,开启电商新洞察
  • Thinkphp指纹识别
  • HarmonyOS Next~鸿蒙系统架构设计解析:分层、模块化与智慧分发的技术革新
  • POI和EasyExcel---处理Excel
  • Python散点图(Scatter Plot):数据探索的“第一张图表”
  • QQ远程控制一连接就结束怎么办?
  • 各种排序汇总
  • 在VMware上部署【Ubuntu】
  • List 和 Set 的区别
  • UI设计中的视觉引导:让用户聚焦关键信息
  • 大语言模型的长思维链推理:综述(上)
  • 【计算机视觉】工业表计读数(1)--基于关键点检测的读数识别方案
  • 系统运营中的数据治理
  • 【AI】AI编程助手:Cursor、Codeium、GitHub Copilot、Roo Cline、Tabnine
  • id: ‘dev.flutter.flutter-plugin-loader‘, version: ‘1.0.0‘怎么解决
  • lunar是一款无第三方依赖的公历 python调用
  • 15-双链表-双链表基本操作