我在中有警报,如果异常计数>0,则会触发这些警报,然后通过web钩子将消息发送到OpsGenie。集成非常有效,但我需要包含更多有关AppInsights异常(消息和类型)的信息,这些异常与警报的查询结果相关。我还想包括URL来查询结果。
我试图在查询中使用下面的Log search,但是我无法在OpsGenie中“捕获”有关查询结果的信息。
exceptions
| where details[0].severityLevel == "Error"
| order by timestamp我还试图使用Exception指标作为信号,但也无法获得这些信息。
我拥有的有效载荷(GUID被混淆为[GUID]):
{
"alertLogOwner": "Azure",
"actionOwner": "Azure",
"alertId": "[GUID]",
"_incomingData": {
"_parsedData": {
"-teams": [
"[GUID]"
],
"-actions": [],
"-tags": [],
"description": "[OpsGenie] Exceptions on Prod count larger than 0",
"alias": "[/subscriptions/[GUID]/providers/Microsoft.AlertsManagement/alerts/[GUID]]",
"_details": {},
"source": "Azure",
"message": "[Azure] GreaterThan 0 LogQueryCriteria in the last PT5M mins was activated\nDescription: [OpsGenie] Exceptions on Prod count large",
"priority": "P3",
"entity": ""
},
"integrationType": "Azure",
"integrationName": "Azure Digital (Prod alerts)",
"integrationId": "[GUID]"
},
"_actionSource": {
"sourceSubName": "Create Alert",
"sourceType": "Azure",
"domain": "integration",
"incomingDataId": "[GUID]",
"sourceName": "Azure Digital (Prod alerts)"
},
"alertLogType": "system"
}我看不到从上面获取查询结果/ URL到警报的任何方法。因此,问题是:如何获得查询结果和OpsGenie中Azure应用程序Insight警报的URL。
发布于 2022-05-12 04:43:30
如何获得查询结果和OpsGenie中的Azure应用程序Insight警报的URL?
正如尼克H建议的那样,添加gist作为社区wiki的答案,以帮助可能面临类似问题的社区成员。
注意:需要将信息包括在payload中。如果没有从AppInsights发送到Opsgenie,那就不可能了。
如果在payload中解析了这些数据,但是在将数据提取到警报中或在日志中找到数据时遇到了困难,则可以向Opsgenie支持求助。
https://stackoverflow.com/questions/72185185
复制相似问题