跳转到主内容

来自 Data Infrastructure Insights 的 PagerDuty webhook 通知因 HTTP 400 Bad Request 而失败

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

适用于

  • Data Infrastructure Insights (DII)

问题

  • PagerDuty 来自 Data Infrastructure Insights 的 webhook 通知失败,错误为 HTTP 400 Bad Request
  • DII webhook 编辑器显示 Error calling Webhook (status: 400)
  • 即使可能已配置自定义路由密钥,警报也不会传递到 PagerDuty。

原因

  • PagerDuty Events API v2 需要在 routing_key JSON 字段中提供有效的集成密钥。
  • DII webhook 消息正文发送一个空的 routing_key 值(例如 "routing_key": ""),或未引用已配置的自定义密钥。
  • PagerDuty 拒绝该有效负载并返回 HTTP 400

解决方案

  1. 在 PagerDuty 中,打开目标服务并复制 Events API v2 Integration Key
  2. 在 DII 中,转到 Admin > Notifications > Webhooks 并编辑 PagerDuty Webhook。
  3. Custom Parameters and Secrets 下,创建或更新名为 routingKey 的密钥,并填入 Integration Key 值。
  4. 在消息正文 JSON 中,在 routing_key 字段中引用该密钥:
    "routing_key": "%%routingKey%%",
  5. 保存 Webhook。
  6. 通过触发真实的监控告警并查看 Webhooks 列表页面上的 StatusLast Reported 列来验证推送是否成功。

合作伙伴备注

 

追加信息

  • 请参阅 PagerDuty 的 Webhook 示例,了解字段映射和设置指导。
  • 注意:DII 测试 Webhook 按钮不会替换参数。仅凭测试时的 400 响应,无法确认生产环境的交付是否中断。

内部参考

  • 源自案例 2010762847。
  • 客户配置了有效的自定义密钥,但消息正文使用了空 routing_key 值,而不是 %%routingKey%%

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.