Azure Monitor 中的 Azure 中继指标Azure Relay metrics in Azure Monitor

Azure 中继指标提供 Azure 订阅中的资源的状态。Azure Relay metrics give you the state of resources in your Azure subscription. 通过一组丰富的指标数据,可在命名空间和实体级别评估中继资源的总体运行状况。With a rich set of metrics data, you can assess the overall health of your Relay resources, not only at the namespace level, but also at the entity level. 这些统计信息非常重要,因为它们能够帮助监视 Azure 中继的状态。These statistics can be important as they help you to monitor the state of Azure Relay. 另外,指标也可帮助解决由根本原因造成的问题,而无需联系 Azure 支持。Metrics can also help troubleshoot root-cause issues without needing to contact Azure support.

Azure Monitor 提供了统一的用户界面,可用于监视各种 Azure 服务。Azure Monitor provides unified user interfaces for monitoring across various Azure services. 有关详细信息,请参阅 GitHub 上的在 Azure 中进行监视通过 .NET 检索 Azure Monitor 指标示例。For more information, see Monitoring in Azure and the Retrieve Azure Monitor metrics with .NET sample on GitHub.

重要

本文仅适用于 Azure 中继的混合连接功能,而不适用于 WCF 中继。This article applies only to the Hybrid Connections feature of Azure Relay, not to the WCF Relay.

访问指标Access metrics

Azure Monitor 提供多种访问指标的方法。Azure Monitor provides multiple ways to access metrics. 可从 Azure 门户、Azure Monitor API(REST 和 .Net)与分析解决方案(例如 Operation Management Suite 和事件中心)访问指标。You can either access metrics through the Azure portal, or use the Azure Monitor APIs (REST and .NET) and analysis solutions such as Operation Management Suite and Event Hubs. 有关详细信息,请参阅 Azure Monitor 收集的监视数据For more information, see Monitoring data collected by Azure Monitor.

默认情况下,已启用指标,并且可访问最近 30 天的数据。Metrics are enabled by default, and you can access the most recent 30 days of data. 如需将数据保留更长一段时间,可将指标数据存档到 Azure 存储帐户。If you need to retain data for a longer period of time, you can archive metrics data to an Azure Storage account. 可在 Azure Monitor 的 诊断设置 中完成这种配置。This is configured in diagnostic settings in Azure Monitor.

在门户中访问指标Access metrics in the portal

可在 Azure 门户中监视一段时间内的指标。You can monitor metrics over time in the Azure portal. 以下示例演示了如何在帐户级别查看成功的请求和传入的请求:The following example shows how to view successful requests and incoming requests at the account level:

标题为“监视 - 指标(预览)”的页面显示过去 30 天的内存使用情况的折线图。

也可以直接通过命名空间来访问指标。You can also access metrics directly via the namespace. 为此,请选择命名空间,然后单击“指标”。To do so, select your namespace and then click **Metrics **.

对于支持维度的指标,必须使用所需的维度值进行筛选。For metrics supporting dimensions, you must filter with the desired dimension value.

计费Billing

在预览版中,目前可免费使用 Azure Monitor 中的指标。Using metrics in Azure Monitor is currently free while in preview. 但是,如果使用引入指标数据的其他解决方案,可能就需要收费。However, if you use additional solutions that ingest metrics data, you may be billed by these solutions. 例如,如果将指标数据存档到 Azure 存储帐户,则 Azure 存储会收费。For example, you are billed by Azure Storage if you archive metrics data to an Azure Storage account. 或者,如果将指标数据流式传输到 Azure Monitor 日志进行高级分析,则 Azure Monitor 日志会收费。You are also billed by Azure Monitor logs if you stream metrics data to Azure Monitor logs for advanced analysis.

以下指标可提供服务运行状况的概述。The following metrics give you an overview of the health of your service.

备注

我们弃用了多个指标,因为它们已移动到不同的名称下。We are deprecating several metrics as they are moved under a different name. 这可能会要求你更新引用。This might require you to update your references. 今后将不再支持标有“弃用的”关键字的指标。Metrics marked with the "deprecated" keyword will not be supported going forward.

所有指标值每隔一分钟发送到 Azure Monitor。All metrics values are sent to Azure Monitor every minute. 时间粒度定义了提供指标值的时间间隔。The time granularity defines the time interval for which metrics values are presented. 所有 Azure 中继指标支持的时间间隔都是 1 分钟。The supported time interval for all Azure Relay metrics is 1 minute.

连接指标Connection metrics

标准名称Metric Name 说明Description
ListenerConnections-SuccessListenerConnections-Success 在指定的期间内成功与 Azure 中继建立的侦听器连接数。The number of successful listener connections made to Azure Relay over a specified period.

单元:计数Unit: Count
聚合类型:总计Aggregation Type: Total
维度:EntityNameDimension: EntityName
ListenerConnections-ClientErrorListenerConnections-ClientError 在指定的期间内在侦听器连接上发生的客户端错误数。The number of client errors on listener connections over a specified period.

单元:计数Unit: Count
聚合类型:总计Aggregation Type: Total
维度:EntityNameDimension: EntityName
ListenerConnections-ServerErrorListenerConnections-ServerError 在指定的期间内在侦听器连接上发生的服务器错误数。The number of server errors on the listener connections over a specified period.

单元:计数Unit: Count
聚合类型:总计Aggregation Type: Total
维度:EntityNameDimension: EntityName
SenderConnections-SuccessSenderConnections-Success 在指定的期间内成功建立的发送者连接数。The number of successful sender connections made over a specified period.

单元:计数Unit: Count
聚合类型:总计Aggregation Type: Total
维度:EntityNameDimension: EntityName
SenderConnections-ClientErrorSenderConnections-ClientError 在指定的期间内在发送者连接上发生的客户端错误数。The number of client errors on sender connections over a specified period.

单元:计数Unit: Count
聚合类型:总计Aggregation Type: Total
维度:EntityNameDimension: EntityName
SenderConnections-ServerErrorSenderConnections-ServerError 在指定的期间内在发送者连接上发生的服务器错误数。The number of server errors on sender connections over a specified period.

单元:计数Unit: Count
聚合类型:总计Aggregation Type: Total
维度:EntityNameDimension: EntityName
ListenerConnections-TotalRequestsListenerConnections-TotalRequests 指定的期间内的侦听器连接总数The total number of listener connections over a specified period.

单元:计数Unit: Count
聚合类型:总计Aggregation Type: Total
维度:EntityNameDimension: EntityName
SenderConnections-TotalRequestsSenderConnections-TotalRequests 在指定的期间内由发送者发出的连接请求数。The connection requests made by the senders over a specified period.

单元:计数Unit: Count
聚合类型:总计Aggregation Type: Total
维度:EntityNameDimension: EntityName
ActiveConnectionsActiveConnections 活动连接的数目。The number of active connections. 此值为时间点值。This value is a point-in-time value.

单元:计数Unit: Count
聚合类型:总计Aggregation Type: Total
维度:EntityNameDimension: EntityName
ActiveListenersActiveListeners 活动侦听器的数目。The number of active listeners. 此值为时间点值。This value is a point-in-time value.

单元:计数Unit: Count
聚合类型:总计Aggregation Type: Total
维度:EntityNameDimension: EntityName
ListenerDisconnectsListenerDisconnects 指定的期间内断开连接的侦听器数。The number of disconnected listeners over a specified period.

单位:字节Unit: Bytes
聚合类型:总计Aggregation Type: Total
维度:EntityNameDimension: EntityName
SenderDisconnectsSenderDisconnects 指定的期间内断开连接的发送者数。The number of disconnected senders over a specified period.

单位:字节Unit: Bytes
聚合类型:总计Aggregation Type: Total
维度:EntityNameDimension: EntityName

内存使用情况指标Memory usage metrics

标准名称Metric Name 说明Description
BytesTransferredBytesTransferred 在指定的期间内传输的字节数。The number of bytes transferred over a specified period.

单位:字节Unit: Bytes
聚合类型:总计Aggregation Type: Total
维度:EntityNameDimension: EntityName

指标维度Metrics dimensions

Azure 中继支持为 Azure Monitor 中的指标使用以下维度。Azure Relay supports the following dimensions for metrics in Azure Monitor. 为指标添加维度是可选的。Adding dimensions to your metrics is optional. 如果不添加维度,则指标是在命名空间级别指定的。If you do not add dimensions, metrics are specified at the namespace level.

维度名称Dimension name 说明Description
EntityNameEntityName Azure 中继支持命名空间下的消息实体。Azure Relay supports messaging entities under the namespace.

后续步骤Next steps

请参阅 Azure 监视概述See the Azure Monitoring overview.