可用性警报Availability alerts

Azure Application Insights 将来自全球各地的 Web 请求定期发送到应用程序。Azure Application Insights sends web requests to your application at regular intervals from points around the world. 如果应用程序无响应或响应太慢,它可以提醒你。It can alert you if your application isn't responding, or if it responds too slowly.

启用警报Enable alerts

默认情况下,现在会自动启用警报,但为了完全配置警报,首先需要创建可用性测试。Alerts are now automatically enabled by default, but in order to fully configure the alert you first have to initially create your availability test.

创建体验

Note

使用新的统一警报时,必须在警报体验中配置预警规则严重性和操作组的通知首选项 。With the new unified alerts, the alert rule severity and notification preferences with action groups must be configured in the alerts experience. 如果不执行以下步骤,则只会收到门户内通知。Without the following steps, you will only receive in-portal notifications.

  1. 保存可用性测试后,在详细信息选项卡上单击你刚才所做的测试旁边的省略号。After saving the availability test, on the details tab click on the ellipsis by the test you just made. 单击“编辑警报”。Click on "edit alert".

    保存后编辑

  2. 设置所需的严重性级别、规则说明,最重要的是设置具有要用于此警报规则的通知首选项的操作组。Set the desired severity level, rule description and most importantly - the action group that has the notification preferences you would like to use for this alert rule.

    保存后编辑

当 Y 个位置中有 X 个报告失败时发出警报Alert on X out of Y locations reporting failures

创建新的可用性测试时,会在新的统一警报体验中默认启用“Y 个位置中的 X 个”警报规则。The X out of Y locations alert rule is enabled by default in the new unified alerts experience, when you create a new availability test. 可通过选择“经典”选项或选择禁用该警报规则来选择退出。You can opt out by selecting the "classic" option or choosing to disable the alert rule.

Note

通过执行上述步骤,将操作组配置为在警报触发时接收通知。Configure the action groups to receive notifications when the alert triggers by following the steps above. 如果不执行此步骤,则在规则触发时只会收到门户内通知。Without this step, you will only receive in-portal notifications when the rule triggers.

根据可用性指标发出警报Alert on availability metrics

使用新的统一警报时,可以根据分段聚合可用性发出警报以及测试持续时间指标:Using the new unified alerts, you can alert on segmented aggregate availability and test duration metrics as well:

  1. 在指标体验中选择 Application Insights 资源,然后选择可用性指标:Select an Application Insights resource in the Metrics experience, and select an Availability metric:

    可用性指标选择

  2. 从菜单中配置警报选项将转到新体验,可在其中选择特定测试或位置以将警报规则设置为打开。Configure alerts option from the menu will take you to the new experience where you can select specific tests or locations to set up alert rule on. 还可以在此处配置此警报规则的操作组。You can also configure the action groups for this alert rule here.

根据自定义分析查询发出警报Alert on custom analytics queries

使用新的统一警报时,可以根据自定义日志查询发出警报。Using the new unified alerts, you can alert on custom log queries. 借助自定义查询,可以在有助于获得最可靠的可用性问题信号的任意条件下发出警报。With custom queries, you can alert on any arbitrary condition that helps you get the most reliable signal of availability issues. 如果使用 TrackAvailability SDK 发送自定义可用性结果,这也特别适用。This is also particularly applicable, if you are sending custom availability results using the TrackAvailability SDK.

Tip

可用性数据的指标包括可能通过调用我们的 TrackAvailability SDK 提交的任何自定义可用性结果。The metrics on availability data include any custom availability results you may be submitting by calling our TrackAvailability SDK. 可以使用“根据指标发出警报”支持根据自定义可用性结果发出警报。You can use the alerting on metrics support to alert on custom availability results.

故障排除Troubleshooting

专用故障排除文章Dedicated troubleshooting article.

后续步骤Next steps