跳转到主内容

单击 DII 通知 Webhook 上的测试 Webhook 返回 HTTP 400 Bad Request

Views:
Visibility:
Public
Votes:
0
Category:
data-infrastructure-insights
Specialty:
om
Last Updated:

适用于

  • Data Infrastructure Insights (DII)

问题

  • 单击 DII 通知 Webhook 上的测试 Webhook会返回HTTP 400 Bad Request
  • 即使 Webhook 配置看起来正确或实时警报传递工作正常,也会出现此错误。
  • 常见于 PagerDuty、Slack、Microsoft Teams 和其他 JSON Webhook 集成。

原因

  • DII Test Webhook 功能完全按照编辑器中编写的方式发送消息正文。
  • Test Webhook 不会替换默认警报参数(例如 %%alertId%%%%severity%%%%triggeredOn%%)或自定义密钥(例如 %%routingKey%%)。
  • 第三方端点验证必填字段并拒绝占位符值,从而产生 HTTP 400

解决方案

  1. 不要将 Test Webhook 作为需要替换值的集成的唯一验证方法。
  2. 要手动测试,请将消息正文中的占位符临时替换为有效的文字值(有效的 PagerDuty 集成密钥、有效的严重性(如 warning)、非空源),运行 Test Webhook,然后在保存之前还原占位符。
  3. 通过触发真实监控警报并查看 StatusLast Reported 列(位于 Admin > Notifications > Webhooks)来验证生产行为。
  4. 有关支持的参数和模板示例,请参阅 DII webhook 文档。

合作伙伴备注

 

追加信息

内部参考

  • 源自案例 2010762847。
  • 支持人员和客户最初将 Test Webhook 400 响应解释为生产警报失败。

Sign in to view the entire content of this KB article.

New to NetApp?

Learn more about our award-winning Support

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.