Skip to content

Commit b94554f

Browse files
authored
Merge pull request #87404 from abshamsft/metrics-article
Adding separate article for metrics
2 parents 259151f + ded43bd commit b94554f

File tree

3 files changed

+212
-65
lines changed

3 files changed

+212
-65
lines changed

articles/application-gateway/application-gateway-diagnostics.md

Lines changed: 3 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ ms.date: 3/28/2019
99
ms.author: victorh
1010

1111
---
12-
# Back-end health, diagnostic logs, and metrics for Application Gateway
12+
# Back-end health and diagnostic logs for Application Gateway
1313

1414
By using Azure Application Gateway, you can monitor resources in the following ways:
1515

1616
* [Back-end health](#back-end-health): Application Gateway provides the capability to monitor the health of the servers in the back-end pools through the Azure portal and through PowerShell. You can also find the health of the back-end pools through the performance diagnostic logs.
1717

1818
* [Logs](#diagnostic-logging): Logs allow for performance, access, and other data to be saved or consumed from a resource for monitoring purposes.
1919

20-
* [Metrics](#metrics): Application Gateway currently has seven metrics to view performance counters.
20+
* [Metrics](application-gateway-metrics.md): Application Gateway has several metrics which help you verify that your system is performing as expected.
2121

2222
[!INCLUDE [updated-for-az](../../includes/updated-for-az.md)]
2323

@@ -167,7 +167,7 @@ The access log is generated only if you've enabled it on each Application Gatewa
167167
|sentBytes| Size of packet sent, in bytes.|
168168
|timeTaken| Length of time (in milliseconds) that it takes for a request to be processed and its response to be sent. This is calculated as 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 the Time-Taken field usually includes the time that the request and response packets are traveling over the network. |
169169
|sslEnabled| Whether communication to the back-end pools used SSL. Valid values are on and off.|
170-
|host| The hostname with which the request has been sent to the backend server. If backend hostname is being overriden, this name will reflect that.|
170+
|host| The hostname with which the request has been sent to the backend server. If backend hostname is being overridden, this name will reflect that.|
171171
|originalHost| The hostname with which the request was received by the Application Gateway from the client.|
172172
```json
173173
{
@@ -355,67 +355,6 @@ You can also connect to your storage account and retrieve the JSON log entries f
355355

356356
We have published a Resource Manager template that installs and runs the popular [GoAccess](https://goaccess.io/) log analyzer for Application Gateway Access Logs. GoAccess provides valuable HTTP traffic statistics such as Unique Visitors, Requested Files, Hosts, Operating Systems, Browsers, HTTP Status codes and more. For more details, please see the [Readme file in the Resource Manager template folder in GitHub](https://aka.ms/appgwgoaccessreadme).
357357

358-
## Metrics
359-
360-
Metrics are a feature for certain Azure resources where you can view performance counters in the portal. For Application Gateway, the following metrics are available:
361-
362-
- **Current Connections**
363-
- **Failed Requests**
364-
- **Healthy Host Count**
365-
366-
You can filter on a per backend pool basis to show healthy/unhealthy hosts in a specific backend pool.
367-
368-
369-
- **Response Status**
370-
371-
The response status code distribution can be further categorized to show responses in 2xx, 3xx, 4xx, and 5xx categories.
372-
373-
- **Throughput**
374-
- **Total Requests**
375-
- **Unhealthy Host count**
376-
377-
You can filter on a per backend pool basis to show healthy/unhealthy hosts in a specific backend pool.
378-
379-
Browse to an application gateway, under **Monitoring** select **Metrics**. To view the available values, select the **METRIC** drop-down list.
380-
381-
In the following image, you see an example with three metrics displayed for the last 30 minutes:
382-
383-
[![](media/application-gateway-diagnostics/figure5.png "Metric view")](media/application-gateway-diagnostics/figure5-lb.png#lightbox)
384-
385-
To see a current list of metrics, see [Supported metrics with Azure Monitor](../azure-monitor/platform/metrics-supported.md).
386-
387-
### Alert rules
388-
389-
You can start alert rules based on metrics for a resource. For example, an alert can call a webhook or email an administrator if the throughput of the application gateway is above, below, or at a threshold for a specified period.
390-
391-
The following example walks you through creating an alert rule that sends an email to an administrator after throughput breaches a threshold:
392-
393-
1. select **Add metric alert** to open the **Add rule** page. You can also reach this page from the metrics page.
394-
395-
!["Add metric alert" button][6]
396-
397-
2. On the **Add rule** page, fill out the name, condition, and notify sections, and select **OK**.
398-
399-
* In the **Condition** selector, select one of the four values: **Greater than**, **Greater than or equal**, **Less than**, or **Less than or equal to**.
400-
401-
* In the **Period** selector, select a period from five minutes to six hours.
402-
403-
* If you select **Email owners, contributors, and readers**, the email can be dynamic based on the users who have access to that resource. Otherwise, you can provide a comma-separated list of users in the **Additional administrator email(s)** box.
404-
405-
![Add rule page][7]
406-
407-
If the threshold is breached, an email that's similar to the one in the following image arrives:
408-
409-
![Email for breached threshold][8]
410-
411-
A list of alerts appears after you create a metric alert. It provides an overview of all the alert rules.
412-
413-
![List of alerts and rules][9]
414-
415-
To learn more about alert notifications, see [Receive alert notifications](../monitoring-and-diagnostics/insights-receive-alert-notifications.md).
416-
417-
To understand more about webhooks and how you can use them with alerts, visit [Configure a webhook on an Azure metric alert](../azure-monitor/platform/alerts-webhooks.md).
418-
419358
## Next steps
420359

421360
* Visualize counter and event logs by using [Azure Monitor logs](../azure-monitor/insights/azure-networking-analytics.md).
Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
---
2+
title: Azure Monitor metrics for Application Gateway
3+
description: Learn how to use metrics to monitor performance of application gateway
4+
services: application-gateway
5+
author: abshamsft
6+
ms.service: application-gateway
7+
ms.topic: article
8+
ms.date: 8/29/2019
9+
ms.author: absha
10+
11+
---
12+
# Metrics for Application Gateway
13+
14+
Application Gateway publishes data points, called metrics, to [Azure Monitor](https://docs.microsoft.com/azure/azure-monitor/overview) 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. 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. For more information, see [Azure Monitor metrics](https://docs.microsoft.com/azure/azure-monitor/platform/data-platform-metrics).
15+
16+
## Metrics supported by Application Gateway V2 SKU
17+
18+
### Timing metrics
19+
20+
The following metrics related to timing of the request and response are available. 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.
21+
22+
- **Client RTT**
23+
24+
Average round trip time between clients and Application Gateway. This metric indicates how long it takes to establish connections and return acknowledgments.
25+
26+
- **Application gateway total time**
27+
28+
Average time that it takes for a request to be processed and its response to be sent. 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.
29+
30+
- **Backend connect time**
31+
32+
Time spent establishing a connection with a backend server.
33+
34+
- **Backend first byte response time**
35+
36+
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
37+
38+
- **Backend last byte response time**
39+
40+
Time interval between start of establishing a connection to backend server and receiving the last byte of the response body
41+
42+
### Application Gateway metrics
43+
44+
For Application Gateway, the following metrics are available:
45+
46+
- **Bytes received**
47+
48+
Count of bytes received by the Application Gateway from the clients
49+
50+
- **Bytes sent**
51+
52+
Count of bytes sent by the Application Gateway to the clients
53+
54+
- **Client TLS protocol**
55+
56+
Count of TLS and non-TLS requests initiated by the client that established connection with the Application Gateway. To view TLS protocol distribution, filter by the dimension TLS Protocol.
57+
58+
- **Current capacity units**
59+
60+
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. Each capacity unit is composed of at most: 1 compute unit, or 2500 persistent connections, or 2.22-Mbps throughput.
61+
62+
- **Current compute units**
63+
64+
Count of processor capacity consumed. Factors affecting compute unit are TLS connections/sec, URL Rewrite computations, and WAF rule processing.
65+
66+
- **Current connections**
67+
68+
Count of current connections established with Application Gateway
69+
70+
- **Failed Requests**
71+
72+
Count of failed requests that Application Gateway has served. The request count can be further filtered to show count per each/specific backend pool-http setting combination.
73+
74+
75+
- **Response Status**
76+
77+
HTTP response status returned by Application Gateway. The response status code distribution can be further categorized to show responses in 2xx, 3xx, 4xx, and 5xx categories.
78+
79+
- **Throughput**
80+
81+
Number of bytes per second the Application Gateway has served
82+
83+
- **Total Requests**
84+
85+
Count of successful requests that Application Gateway has served. The request count can be further filtered to show count per each/specific backend pool-http setting combination.
86+
87+
- **Web Application Firewall matched rules**
88+
89+
- **Web Application Firewall triggered rules**
90+
91+
### Backend metrics
92+
93+
For Application Gateway, the following metrics are available:
94+
95+
- **Backend response status**
96+
97+
Count of HTTP response status codes returned by the backends. This does not include any response codes generated by the Application Gateway. The response status code distribution can be further categorized to show responses in 2xx, 3xx, 4xx, and 5xx categories.
98+
99+
- **Healthy host count**
100+
101+
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.
102+
103+
- **Unhealthy host count**
104+
105+
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.
106+
107+
## Metrics supported by Application Gateway V1 SKU
108+
109+
### Application Gateway metrics
110+
111+
For Application Gateway, the following metrics are available:
112+
113+
- **Current connections**
114+
115+
Count of current connections established with Application Gateway
116+
117+
- **Failed Requests**
118+
119+
Count of failed requests that Application Gateway has served. The request count can be further filtered to show count per each/specific backend pool-http setting combination.
120+
121+
- **Response Status**
122+
123+
HTTP response status returned by Application Gateway. The response status code distribution can be further categorized to show responses in 2xx, 3xx, 4xx, and 5xx categories.
124+
125+
- **Throughput**
126+
127+
Number of bytes per second the Application Gateway has served
128+
129+
- **Total Requests**
130+
131+
Count of successful requests that Application Gateway has served. The request count can be further filtered to show count per each/specific backend pool-http setting combination.
132+
133+
- **Web Application Firewall matched rules**
134+
135+
- **Web Application Firewall triggered rules**
136+
137+
### Backend metrics
138+
139+
For Application Gateway, the following metrics are available:
140+
141+
- **Healthy host count**
142+
143+
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.
144+
145+
- **Unhealthy host count**
146+
147+
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.
148+
149+
## Metrics visualization
150+
151+
Browse to an application gateway, under **Monitoring** select **Metrics**. To view the available values, select the **METRIC** drop-down list.
152+
153+
In the following image, you see an example with three metrics displayed for the last 30 minutes:
154+
155+
[![](media/application-gateway-diagnostics/figure5.png "Metric view")](media/application-gateway-diagnostics/figure5-lb.png#lightbox)
156+
157+
To see a current list of metrics, see [Supported metrics with Azure Monitor](../azure-monitor/platform/metrics-supported.md).
158+
159+
### Alert rules on metrics
160+
161+
You can start alert rules based on metrics for a resource. For example, an alert can call a webhook or email an administrator if the throughput of the application gateway is above, below, or at a threshold for a specified period.
162+
163+
The following example walks you through creating an alert rule that sends an email to an administrator after throughput breaches a threshold:
164+
165+
1. select **Add metric alert** to open the **Add rule** page. You can also reach this page from the metrics page.
166+
167+
!["Add metric alert" button][6]
168+
169+
2. On the **Add rule** page, fill out the name, condition, and notify sections, and select **OK**.
170+
171+
* In the **Condition** selector, select one of the four values: **Greater than**, **Greater than or equal**, **Less than**, or **Less than or equal to**.
172+
173+
* In the **Period** selector, select a period from five minutes to six hours.
174+
175+
* If you select **Email owners, contributors, and readers**, the email can be dynamic based on the users who have access to that resource. Otherwise, you can provide a comma-separated list of users in the **Additional administrator email(s)** box.
176+
177+
![Add rule page][7]
178+
179+
If the threshold is breached, an email that's similar to the one in the following image arrives:
180+
181+
![Email for breached threshold][8]
182+
183+
A list of alerts appears after you create a metric alert. It provides an overview of all the alert rules.
184+
185+
![List of alerts and rules][9]
186+
187+
To learn more about alert notifications, see [Receive alert notifications](../monitoring-and-diagnostics/insights-receive-alert-notifications.md).
188+
189+
To understand more about webhooks and how you can use them with alerts, visit [Configure a webhook on an Azure metric alert](../azure-monitor/platform/alerts-webhooks.md).
190+
191+
## Next steps
192+
193+
* Visualize counter and event logs by using [Azure Monitor logs](../azure-monitor/insights/azure-networking-analytics.md).
194+
* [Visualize your Azure activity log with Power BI](https://blogs.msdn.com/b/powerbi/archive/2015/09/30/monitor-azure-audit-logs-with-power-bi.aspx) blog post.
195+
* [View and analyze Azure activity logs in Power BI and more](https://azure.microsoft.com/blog/analyze-azure-audit-logs-in-powerbi-more/) blog post.
196+
197+
[1]: ./media/application-gateway-diagnostics/figure1.png
198+
[2]: ./media/application-gateway-diagnostics/figure2.png
199+
[3]: ./media/application-gateway-diagnostics/figure3.png
200+
[4]: ./media/application-gateway-diagnostics/figure4.png
201+
[5]: ./media/application-gateway-diagnostics/figure5.png
202+
[6]: ./media/application-gateway-diagnostics/figure6.png
203+
[7]: ./media/application-gateway-diagnostics/figure7.png
204+
[8]: ./media/application-gateway-diagnostics/figure8.png
205+
[9]: ./media/application-gateway-diagnostics/figure9.png
206+
[10]: ./media/application-gateway-diagnostics/figure10.png

articles/application-gateway/toc.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@
8181
items:
8282
- name: Health probe
8383
href: application-gateway-probe-overview.md
84-
- name: Diagnostics
84+
- name: Diagnostic logs and backend health
8585
href: application-gateway-diagnostics.md
86+
- name: Metrics
87+
href: application-gateway-metrics.md
8688
- name: App service webapp and multi-tenant support
8789
href: application-gateway-web-app-overview.md
8890
- name: WebSocket support

0 commit comments

Comments
 (0)