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

SkyWalking 支持的告警通知方式(Alarm Hooks)类型

告警通知类型说明

  • webhook: 通用的 Webhook 通知方式,可以将告警发送到自定义的 HTTP 接口
  • gRPC: 通过 gRPC 协议发送告警通知
  • wechat: 发送到企业微信(WeChat Work)应用
  • slack: 发送到 Slack 协议的聊天 workspace
  • dingtalk: 发送到钉钉(DingTalk)应用
  • feishu: 发送到飞书(Feishu/Lark)应用
  • welink: 发送到华为 Welink 应用
  • discord: 发送到 Discord 聊天平台
  • pagerduty: 发送到 PagerDuty 运维平台

告警模版:

rules:# Rule unique name, must be ended with `_rule`.endpoint_percent_rule:expression: sum(endpoint_percent < 75) >= 3period: 10# How many times of checks, the alarm keeps silence after alarm triggered, default as same as period.silence-period: 10message: Successful rate of endpoint {name} is lower than 75%service_percent_rule:expression: sum(service_percent < 85) >= 4# [Optional] Default, match all services in this metricsinclude-names:- service_a- service_bexclude-names:- service_cperiod: 10endpoint_percent_more_rule:expression: sum(endpoint_percent > 60) >= 3# The length of time to evaluate the metricsperiod: 10# How many times of checks, the alarm keeps silence after alarm triggered, default as same as period.silence-period: 10message: Successful rate of endpoint {name} is higher than 60%hooks:- "slack.custom1"- "pagerduty.custom1"comp1_rule:expression: sum((endpoint_percent > 60) * (endpoint_percent < 75)) >= 3period: 10silence-period: 10message: xxxxxcomp2_rule:expression: sum((endpoint_percent > 60) * (endpoint_percent < 75)) >= 3period: 10silence-period: 10message: xxxxxhooks:- "slack.default"- "slack.custom1"- "pagerduty.custom1"hooks:webhook:default:is-default: trueurls:- http://127.0.0.1/notify/- http://127.0.0.1/go-wechat/custom1:urls:- http://127.0.0.1/custom1headers:Authorization: Bearer bearer_tokenx-company-header: arbitrary-additional-http-headersgRPC:default:is-default: truetarget-host: 127.0.0.1target-port: 9888slack:default:is-default: truetext-template: |-{"type": "section","text": {"type": "mrkdwn","text": ":alarm_clock: *Apache Skywalking Alarm* \n **%s**."}}webhooks:- https://hooks.slack.com/services/x/y/zsssscustom1:text-template: |-{"type": "section","text": {"type": "mrkdwn","text": ":alarm_clock: *Apache Skywalking Alarm* \n **%s**."}}webhooks:- https://hooks.slack.com/services/x/y/zsssswechat:default:is-default: truetext-template: |-{"msgtype": "text","text": {"content": "Apache SkyWalking Alarm: \n %s."}}webhooks:- https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=dummy_keydingtalk:default:is-default: truetext-template: |-{"msgtype": "text","text": {"content": "Apache SkyWalking Alarm: \n %s."}}webhooks:- url: https://oapi.dingtalk.com/robot/send?access_token=dummy_tokensecret: dummysecret- url: https://oapi.dingtalk.com/robot/send?access_token=dummy_token2secret:feishu:default:is-default: truetext-template: |-{"msg_type": "text",# at someone with feishu_user_ids# "ats": "feishu_user_id_1,feishu_user_id_2","content": {"text": "Apache SkyWalking Alarm: \n %s."}}webhooks:- url: https://open.feishu.cn/open-apis/bot/v2/hook/dummy_tokensecret: dummysecret- url: https://open.feishu.cn/open-apis/bot/v2/hook/dummy_token2secret:welink:default:is-default: truetext-template: "Apache SkyWalking Alarm: \n %s."webhooks:# you may find your own client_id and client_secret in your app, below are dummy, need to change.- client-id: "dummy_client_id"client-secret: dummy_secret_keyaccess-token-url: https://open.welink.huaweicloud.com/api/auth/v2/ticketsmessage-url: https://open.welink.huaweicloud.com/api/welinkim/v1/im-service/chat/group-chat# if you send to multi group at a time, separate group_ids with commas, e.g. "123xx","456xx"group-ids: "dummy_group_id"# make a name you like for the robot, it will display in grouprobot-name: robotpagerduty:default:is-default: truetext-template: "dummy_text_template"integration-keys:- dummy_key- dummy_key2custom1:text-template: "Apache SkyWalking Alarm: \n %s."integration-keys:#    # you can find your integration key(s) on the Events API V2 integration page for your PagerDuty service(s).#    # (you may need to create an Events API V2 integration for your PagerDuty service if you don't have one yet)#    # below are dummy keys that should be replaced with your own integration keys.- dummy_key- dummy_key2

注意:缩进只能用空格,不能用 tab(\t)

http://www.xdnf.cn/news/19740.html

相关文章:

  • MySQL常见报错分析及解决方案总结(9)---出现interactive_timeout/wait_timeout
  • 51单片机----LED与数码管模块
  • 计算机网络:(十七)应用层(上)应用层基本概念
  • 如何创建交换空间
  • Elasticsearch(高性能分布式搜索引擎)01
  • Day20_【机器学习—逻辑回归 (2)—分类评估方法】
  • 硬件基础与c51基础
  • 深入剖析Spring Boot中Spring MVC的请求处理流程
  • Linux(2)|入门的开始:Linux基本指令(2)
  • FPGA实现流水式排序算法
  • 开源 C++ QT Widget 开发(十二)图表--环境监测表盘
  • CouponHub项目开发记录-基于责任链来进行创建优惠券模板的参数验证
  • Django get_or_create 方法详解
  • centos9 docker启动不起来,docker启动发生堵塞问题!
  • 少儿舞蹈小程序(6)打造您的“活”名片:动态展示机构实力
  • MySQL的utf8 、utf8mb3 和 utf8mb4 的区别和排序规则
  • Python 工具: Windows 带宽监控工具
  • JavaScript考核
  • Tomcat 全面指南:从目录结构到应用部署与高级配置
  • mit6.031 2023spring 软件构造 笔记 Specification
  • 【LeetCode 热题 100】1143. 最长公共子序列——(解法二)递推
  • 2025 大学生职业准备清单:从数据到财会,这些核心证书值得考
  • 【IO】多进程编程课后练习
  • 单多行文本溢出
  • Selenium核心技巧:元素定位与等待策略
  • ArkUI核心功能组件使用
  • 【线段树】3525. 求出数组的 X 值 II|2645
  • Spring 事务原理解析:AOP 的一次完美落地
  • 深度学习——基于卷积神经网络实现食物图像分类【4】(使用最优模型)
  • 广度优先搜索(BFS, Breadth-First Search)