流量管理器指标和警报Traffic Manager metrics and alerts

流量管理器提供了基于 DNS 的负载均衡,这包括多种路由方法和终结点监视选项。Traffic Manager provides you with DNS-based load balancing that includes multiple routing methods and endpoint monitoring options. 本文介绍了与可供客户使用的警报关联的指标。This article describes the metrics and associated alerts that are available to customers.

流量管理器中提供的指标Metrics available in Traffic Manager

流量管理器针对每个配置文件提供了以下指标,客户可用于了解其流量管理器的使用情况以及该配置文件管理的终结点的状态。Traffic Manager provides the following metrics on a per profile basis that customers can use to understand their usage of Traffic manager and the status of their endpoints under that profile.

按终结点返回的查询Queries by endpoint returned

使用此指标可以查看流量管理器配置文件进程在指定的时间段内处理的查询数。Use this metric to view the number of queries that a Traffic Manager profile processes over a specified period. 还可以在终结点级别粒度查看同一信息,这可帮助你了解某个终结点在来自流量管理器的查询响应中返回了多少次。You can also view the same information at an endpoint level granularity that helps you understand how many times an endpoint was returned in the query responses from Traffic Manager.

在下面的示例中,图 1 显示了流量管理器配置文件返回的所有查询响应。In the following example, Figure 1 displays all the query responses that the Traffic Manager profile returns.

所有查询的聚合视图

图 1: 包含所有查询的聚合视图Figure 1: Aggregate view with all queries

图 2 显示了同一信息,不过它按终结点进行了拆分。Figure 2 displays the same information, however, it is split by endpoints. 因此,你可以看到其中返回了某个特定终结点的查询响应的数量。As a result, you can see the volume of query responses in which a specific endpoint was returned.

流量管理器指标 - 按终结点的查询量拆分视图

图 2: 其中显示了按终结点返回的查询量的拆分视图Figure 2: Split view with query volume shown per endpoint returned

按终结点显示的终结点状态Endpoint status by endpoint

使用此指标可以了解配置文件中的终结点的运行状况状态。Use this metric to understand the health status of the endpoints in the profile. 它采用两个值:It takes two values:

  • 如果终结点正常运行,则使用 1 。use 1 if the endpoint is up.
  • 如果终结点发生故障,则使用 0use 0 if the endpoint is down.

此指标可以显示为聚合值,表示所有指标的状态(图 3),也可以拆分(参见图 4)来显示特定终结点的状态。This metric can be shown either as an aggregate value representing the status of all the metrics (Figure 3), or, it can be split (see Figure 4) to show the status of specific endpoints. 如果为前者,聚合级别选择为“平均值”时,此指标的值是所有终结点的状态的算术平均值 。If the former, if the aggregation level is selected as Avg, the value of this metric is the arithmetic average of the status of all endpoints. 例如,如果某个配置文件具有两个终结点并且只有一个终结点正常,则此指标的值将是 0.50,如图 3 所示 。For example, if a profile has two endpoints and only one is healthy, then this metric has a value of 0.50 as shown in Figure 3.

流量管理器指标 - 终结点状态的复合视图

图 3: 终结点状态指标的组合视图 - 选择了“平均值”聚合Figure 3: Composite view of endpoint status metric - "Avg" aggregation selected

流量管理器指标 - 终结点状态的拆分视图

图 4: 终结点状态指标的拆分视图Figure 4: Split view of endpoint status metrics

可以通过 Azure Monitor 服务的门户、REST APIAzure CLIAzure PowerShell 或者通过流量管理器的门户体验的指标部分来使用这些指标。You can consume these metrics through Azure Monitor service's portal, REST API, Azure CLI, and Azure PowerShell, or through the metrics section of Traffic Manager's portal experience.

针对流量管理器指标的警报Alerts on Traffic Manager metrics

除了处理和显示来自流量管理器的指标外,Azure Monitor 还允许客户配置和接收与这些指标关联的警报。In addition to processing and displaying metrics from Traffic Manager, Azure Monitor enables customers to configure and receive alerts associated with these metrics. 你可以选择这些指标需要满足什么条件才会发生警报、需要以何频率监视这些条件,以及应当如何向你发送警报。You can choose what conditions need to be met in these metrics for an alert to occur, how often those conditions need to be monitored, and how the alerts should be sent to you. 有关详细信息,请参阅 Azure Monitor 警报文档For more information, see Azure Monitor alerts documentation.

后续步骤Next steps