应用程序网关的指标Metrics for Application Gateway

应用程序网关会将称为“指标”的数据点发布到 Azure Monitor,使用户能够监视应用程序网关和后端实例的性能。Application Gateway publishes data points, called metrics, to Azure Monitor for the performance of your Application Gateway and backend instances. 这些指标是一组有序时序数据中的数值,用于描述应用程序网关在特定时间的某种状况。These metrics are numerical values in an ordered set of time-series data that describe some aspect of your application gateway at a particular time. 如果请求通过应用程序网关传送,则应用程序网关将会测量其指标并每隔 60 秒发送一次指标。If there are requests flowing through the Application Gateway, it measures and sends its metrics in 60-second intervals. 如果没有任何请求通过应用程序网关传送,或者指标没有数据,则不会报告指标。If there are no requests flowing through the Application Gateway or no data for a metric, the metric is not reported. 有关详细信息,请参阅 Azure Monitor 指标For more information, see Azure Monitor metrics.

应用程序网关 V2 SKU 支持的指标Metrics supported by Application Gateway V2 SKU

计时指标Timing metrics

可以使用与请求和响应计时相关的以下指标。The following metrics related to timing of the request and response are available. 分析这些指标可以确定应用程序是否由于 WAN、应用程序网关、应用程序网关与后端之间的网络或者应用程序性能的问题而减慢。By analyzing these metrics, you can determine whether the slowdown in application in due to the WAN, the Application Gateway, the network between the Application Gateway and the backend, or the application performance.

  • 客户端 RTTClient RTT

    客户端与应用程序网关之间的平均往返时间。Average round trip time between clients and Application Gateway. 此指标指示建立连接和返回确认所用的时间。This metric indicates how long it takes to establish connections and return acknowledgments.

  • 应用程序网关总时间Application gateway total time

    处理请求和发送响应平均花费的时间。Average time that it takes for a request to be processed and its response to be sent. 此时间按特定的平均时间间隔(从应用程序网关接收第一个 HTTP 请求字节到完成响应发送操作所需的时间)来计算。This is calculated as average of the interval from the time when Application Gateway receives the first byte of an HTTP request to the time when the response send operation finishes. 必须注意,这通常包括应用程序网关处理时间、请求和响应数据包遍历网络的时间,以及后端服务器做出响应所花费的时间。It's important to note that this usually includes the Application Gateway processing time, time that the request and response packets are traveling over the network and the time the backend server took to respond.

  • 后端连接时间Backend connect time

    与后端服务器建立连接所花费的时间。Time spent establishing a connection with a backend server.

  • 后端第一个字节响应时间Backend first byte response time

    从开始与后端服务器建立连接,到收到响应标头的第一个字节的间隔时间,大致相当于后端服务器的处理时间Time interval between start of establishing a connection to backend server and receiving the first byte of the response header, approximating processing time of backend server

  • 后端最后一个字节响应时间Backend last byte response time

    从开始与后端服务器建立连接,到收到响应正文的最后一个字节的间隔时间Time interval between start of establishing a connection to backend server and receiving the last byte of the response body

应用程序网关指标Application Gateway metrics

应用程序网关支持以下指标:For Application Gateway, the following metrics are available:

  • 接收的字节数Bytes received

    应用程序网关从客户端收到的字节数Count of bytes received by the Application Gateway from the clients

  • 发送的字节数Bytes sent

    应用程序网关向客户端发送的字节数Count of bytes sent by the Application Gateway to the clients

  • 客户端 TLS 协议Client TLS protocol

    与应用程序网关建立了连接的客户端发起的 TLS 和非 TLS 请求计数。Count of TLS and non-TLS requests initiated by the client that established connection with the Application Gateway. 若要查看 TLS 协议分布,请按“TLS 协议”维度进行筛选。To view TLS protocol distribution, filter by the dimension TLS Protocol.

  • 当前容量单位数Current capacity units

    消耗的容量单位数。Count of capacity units consumed. 容量单位测量在固定价格的基础上按消耗量计收的费用。Capacity units measure consumption-based cost that is charged in addition to the fixed cost. 容量单位有三个决定因素 - 计算单位、持久连接和吞吐量。There are three determinants to capacity unit - compute unit, persistent connections and throughput. 每个容量单位最多包括:1 个计算单位,或 2500 个持久连接,或 2.22-Mbps 吞吐量。Each capacity unit is composed of at most: 1 compute unit, or 2500 persistent connections, or 2.22-Mbps throughput.

  • 当前计算单位数Current compute units

    消耗的处理器容量计数。Count of processor capacity consumed. 影响计算单位的因素包括每秒 TLS 连接数、URL 重写计算和 WAF 规则处理。Factors affecting compute unit are TLS connections/sec, URL Rewrite computations, and WAF rule processing.

  • 当前连接数Current connections

    使用应用程序网关建立的当前连接计数Count of current connections established with Application Gateway

  • 失败的请求数Failed Requests

    应用程序网关已提供服务的失败请求计数。Count of failed requests that Application Gateway has served. 可以进一步筛选请求计数,以显示每个/特定后端池 http 设置组合的计数。The request count can be further filtered to show count per each/specific backend pool-http setting combination.

  • 响应状态Response Status

    应用程序网关返回的 HTTP 响应状态。HTTP response status returned by Application Gateway. 可以进一步对响应状态代码分布进行归类来显示 2xx、3xx、4xx 和 5xx 类别的响应。The response status code distribution can be further categorized to show responses in 2xx, 3xx, 4xx, and 5xx categories.

  • 吞吐量Throughput

    应用程序网关每秒提供的字节数Number of bytes per second the Application Gateway has served

  • 请求总数Total Requests

    应用程序网关已提供服务的成功请求计数。Count of successful requests that Application Gateway has served. 可以进一步筛选请求计数,以显示每个/特定后端池 http 设置组合的计数。The request count can be further filtered to show count per each/specific backend pool-http setting combination.

  • Web 应用程序防火墙匹配的规则Web Application Firewall matched rules

  • Web 应用程序防火墙触发的规则Web Application Firewall triggered rules

后端指标Backend metrics

应用程序网关支持以下指标:For Application Gateway, the following metrics are available:

  • 后端响应状态Backend response status

    后端返回的 HTTP 响应状态代码计数。Count of HTTP response status codes returned by the backends. 这不包括应用程序网关生成的任何响应代码。This does not include any response codes generated by the Application Gateway. 可以进一步对响应状态代码分布进行归类来显示 2xx、3xx、4xx 和 5xx 类别的响应。The response status code distribution can be further categorized to show responses in 2xx, 3xx, 4xx, and 5xx categories.

  • 正常的主机计数Healthy host count

    由运行状况探测判定为正常的后端数。The number of backends that are determined healthy by the health probe. 可以按每个后端池进行筛选来显示特定后端池中正常的/不正常的主机数。You can filter on a per backend pool basis to show healthy/unhealthy hosts in a specific backend pool.

  • 不正常的主机计数Unhealthy host count

    由运行状况探测判定为不正常的后端数。The number of backends that are determined unhealthy by the health probe. 可按每个后端池进行筛选,以显示特定后端池中不正常的主机。You can filter on a per backend pool basis to show unhealthy hosts in a specific backend pool.

应用程序网关 V1 SKU 支持的指标Metrics supported by Application Gateway V1 SKU

应用程序网关指标Application Gateway metrics

应用程序网关支持以下指标:For Application Gateway, the following metrics are available:

  • 当前连接数Current connections

    使用应用程序网关建立的当前连接计数Count of current connections established with Application Gateway

  • 失败的请求数Failed Requests

    应用程序网关已提供服务的失败请求计数。Count of failed requests that Application Gateway has served. 可以进一步筛选请求计数,以显示每个/特定后端池 http 设置组合的计数。The request count can be further filtered to show count per each/specific backend pool-http setting combination.

  • 响应状态Response Status

    应用程序网关返回的 HTTP 响应状态。HTTP response status returned by Application Gateway. 可以进一步对响应状态代码分布进行归类来显示 2xx、3xx、4xx 和 5xx 类别的响应。The response status code distribution can be further categorized to show responses in 2xx, 3xx, 4xx, and 5xx categories.

  • 吞吐量Throughput

    应用程序网关每秒提供的字节数Number of bytes per second the Application Gateway has served

  • 请求总数Total Requests

    应用程序网关已提供服务的成功请求计数。Count of successful requests that Application Gateway has served. 可以进一步筛选请求计数,以显示每个/特定后端池 http 设置组合的计数。The request count can be further filtered to show count per each/specific backend pool-http setting combination.

  • Web 应用程序防火墙匹配的规则Web Application Firewall matched rules

  • Web 应用程序防火墙触发的规则Web Application Firewall triggered rules

后端指标Backend metrics

应用程序网关支持以下指标:For Application Gateway, the following metrics are available:

  • 正常的主机计数Healthy host count

    由运行状况探测判定为正常的后端数。The number of backends that are determined healthy by the health probe. 可以按每个后端池进行筛选来显示特定后端池中正常的/不正常的主机数。You can filter on a per backend pool basis to show healthy/unhealthy hosts in a specific backend pool.

  • 不正常的主机计数Unhealthy host count

    由运行状况探测判定为不正常的后端数。The number of backends that are determined unhealthy by the health probe. 可按每个后端池进行筛选,以显示特定后端池中不正常的主机。You can filter on a per backend pool basis to show unhealthy hosts in a specific backend pool.

指标可视化Metrics visualization

浏览到应用程序网关,并在“监视”下选择“指标” 。Browse to an application gateway, under Monitoring select Metrics. 若要查看可用值,请选择“指标”下拉列表 。To view the available values, select the METRIC drop-down list.

在下图中可以看到过去 30 分钟显示的三个指标的示例:In the following image, you see an example with three metrics displayed for the last 30 minutes:

若要查看当前的指标列表,请参阅 Azure Monitor 支持的指标To see a current list of metrics, see Supported metrics with Azure Monitor.

后续步骤Next steps