警报Alerts

重要

此功能目前以公共预览版提供。This feature is in Public Preview. 请联系 Azure Databricks 代表,以申请访问权限。Contact your Azure Databricks representative to request access.

计划查询返回的字段达到阈值时,你会收到警报。Alerts notify you when a field returned by a scheduled query meets a threshold. 使用警报来监视业务或将其与工具集成,以启动用户加入或支持工单等工作流。Use alerts to monitor your business or integrate them with tools to start workflows such as user onboarding or support tickets. 警报是对计划查询的补充,但每次执行后都会检查警报的条件。Alerts complement scheduled queries, but their criteria are checked after every execution.

重要

  • 查询计划不是必需的,但强烈建议用于警报。A query schedule is not required but is highly recommended for alerts. 如果将警报添加到非计划查询,则只有在用户手动执行查询并且满足警报条件时,你才会收到警报。If you add an alert to a non-scheduled query you will be notified only if a user executes the query manually and the alert criteria are met.
  • 警报不适用于具有参数的查询。Alerts don’t work for queries with parameters.

查看警报View alerts

若要查看警报列表,请单击边栏中的警报图标图标。To see a list of alerts, click the Alerts Icon icon in the sidebar. 默认情况下,警报按“创建者”列以时间倒序排序。By default, alerts are sorted in reverse chronological order by the Created By column. 可以通过单击列标题重新对列表进行排序。You can reorder the list by clicking the column headings.

  • “名称”显示每个警报的字符串名称。Name shows the string name of each alert.
  • “创建者”显示创建警报的用户。Created By shows the user that created the alert.
  • “状态”显示警报状态是 TRIGGEREDOK 还是 UNKNOWNState shows whether the alert status is TRIGGERED, OK, or UNKNOWN.
    • TRIGGERED 表示执行最后一次查询时,目标查询中的“值”列满足配置的“条件”和“阈值”。TRIGGERED means that on the most recent execution, the Value column in your target query met the Condition and Threshold you configured. 如果警报检查“cats”是否高于 1500,则“cats”高于 1500 时将触发警报。If your alert checks whether “cats” is above 1500, your alert will be triggered as long as “cats” is above 1500.
    • OK 表示执行最后一次查询时,“值”列不满足配置的“条件”和“阈值”。OK means that on the most recent query execution, the Value column did not meet the Condition and Threshold you configured. 这并不表示之前未触发“警报”。This doesn’t mean that the Alert was not triggered previously. 如果“cats”值现为 1470,则警报将显示为“OK”。If your “cats” value is now 1470 your alert will show as OK.
    • UNKNOWN 表示 SQL Analytics 缺少足够数据,无法评估警报条件。UNKNOWN means SQL Analytics does not have enough data to evaluate the alert criteria. 创建警报后将立即显示此状态,直到查询执行完毕。You will see this status immediately after creating your Alert until the query has executed. 如果查询结果中没有数据,或者最新查询结果中不包含配置的“值列”,也会显示此状态。You will also see this status if there was no data in the query result or if the most recent query result doesn’t include the Value Column you configured.

警报列表Alert list