You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/app/availability.md
+27-36Lines changed: 27 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,16 +37,17 @@ There are four types of availability tests:
37
37
38
38
## Create an availability test
39
39
40
+
## [Standard test](#tab/standard)
41
+
40
42
> [!TIP]
41
43
> If you're currently using other availability tests, like URL ping tests, you might add Standard tests alongside the others. If you want to use Standard tests instead of one of your other tests, add a Standard test and delete your old test.
42
44
43
-
### [Standard test](#tab/standard)
44
-
45
-
#### Prerequisites
45
+
### Prerequisites
46
46
47
-
To create an availability test, you must use an existing Application Insights resource or [create an Application Insights resource](create-workspace-resource.md).
1. Go to your Application Insights resource and select the **Availability** pane.
52
53
@@ -69,26 +70,26 @@ To create an availability test, you must use an existing Application Insights re
69
70
|**HTTP request verb**| Indicate what action you want to take with your request. |
70
71
|**Request body**| Custom data associated with your HTTP request. You can upload your own files, enter your content, or disable this feature. |
71
72
72
-
####Success criteria
73
+
### Success criteria
73
74
74
75
| Setting | Description |
75
76
|--------|--------------|
76
77
|**Test timeout**|Decrease this value to be alerted about slow responses. The test is counted as a failure if the responses from your site haven't been received within this period. If you selected **Parse dependent requests**, all the images, style files, scripts, and other dependent resources must have been received within this period. |
77
78
|**HTTP response**| The returned status code that's counted as a success. The number 200 is the code that indicates that a normal webpage has been returned. |
78
79
|**Content match**| A string, like "Welcome!" We test that an exact case-sensitive match occurs in every response. It must be a plain string, without wildcards. Don't forget that if your page content changes, you might have to update it. *Only English characters are supported with content match.*|
79
80
80
-
####Alerts
81
+
### Alerts
81
82
82
83
| Setting | Description |
83
84
|---------|-------------|
84
85
|**Near real time**| We recommend using near real time alerts. Configuring this type of alert is done after your availability test is created. |
85
86
|**Alert location threshold**|We recommend a minimum of 3/5 locations. The optimal relationship between alert location threshold and the number of test locations is **alert location threshold** = **number of test locations - 2, with a minimum of five test locations.**|
86
87
87
-
####Location population tags
88
+
### Location population tags
88
89
89
90
You can use the following population tags for the geo-location attribute when you deploy an availability URL ping test by using Azure Resource Manager.
@@ -109,7 +110,7 @@ You can use the following population tags for the geo-location attribute when yo
109
110
| West US | us-ca-sjc-azr |
110
111
| UK South | emea-ru-msa-edge |
111
112
112
-
#####Azure Government
113
+
#### Azure Government
113
114
114
115
| Display name | Population name |
115
116
|----------------|---------------------|
@@ -119,7 +120,7 @@ You can use the following population tags for the geo-location attribute when yo
119
120
| USDoD East | usgov-ddeast-azr |
120
121
| USDoD Central | usgov-ddcentral-azr |
121
122
122
-
#####Microsoft Azure operated by 21Vianet
123
+
#### Microsoft Azure operated by 21Vianet
123
124
124
125
| Display name | Population name |
125
126
|----------------|---------------------|
@@ -128,25 +129,26 @@ You can use the following population tags for the geo-location attribute when yo
128
129
| China North | mc-cnn-azr |
129
130
| China North 2 | mc-cnn2-azr |
130
131
131
-
###[TrackAvailability()](#tab/track)
132
+
## [TrackAvailability()](#tab/track)
132
133
133
134
> [!IMPORTANT]
134
135
> [TrackAvailability()](/dotnet/api/microsoft.applicationinsights.telemetryclient.trackavailability) requires making a developer investment in writing and maintanining potentially complex custom code. *[Standard tests](#standard-test) should always be used if possible* as they require little investment, no maintenance, and have few prerequisites.
135
136
136
-
#### Prerequisites
137
-
138
-
To create an availability test, you must use an existing Application Insights resource or [create an Application Insights resource](create-workspace-resource.md).
> * Access to the source code of a [function app](../../azure-functions/functions-how-to-use-azure-function-app-settings.md) in Azure Functions
142
+
> * Developer expertise capable of authoring [custom code](#basic-code-sample) for [TrackAvailability()](/dotnet/api/microsoft.applicationinsights.telemetryclient.trackavailability), tailored to your specific business needs
141
143
142
-
#####Basic code sample
144
+
### Basic code sample
143
145
144
146
> [!NOTE]
145
147
> This example is designed solely to show you the mechanics of how the `TrackAvailability()` API call works within an Azure function. It doesn't show you how to write the underlying HTTP test code or business logic that's required to turn this example into a fully functional availability test. By default, if you walk through this example, you'll be creating a basic availability HTTP GET test.
146
148
>
147
149
> To follow these instructions, you must use the [dedicated plan](../../azure-functions/dedicated-plan.md) to allow editing code in App Service Editor.
148
150
149
-
######Create a timer trigger function
151
+
#### Create a timer trigger function
150
152
151
153
1. Create an Azure Functions resource.
152
154
If you already have an Application Insights resource:
@@ -173,7 +175,7 @@ To create an availability test, you must use an existing Application Insights re
173
175
174
176
:::image type="content" source="media/availability-azure-functions/add-function.png" alt-text="Screenshot that shows how to add a timer trigger function to your function app." lightbox="media/availability-azure-functions/add-function.png":::
175
177
176
-
######Add and edit code in the App Service Editor
178
+
#### Add and edit code in the App Service Editor
177
179
178
180
Go to your deployed function app, and under **Development Tools**, select the **App Service Editor** tab.
179
181
@@ -305,7 +307,7 @@ To create a new file, right-click under your timer trigger function (for example
305
307
306
308
```
307
309
308
-
###### Multi-step web test code sample
310
+
#### Multi-step web test code sample
309
311
310
312
Follow the same instructions above and instead paste the following code into the **runAvailabilityTest.csx** file:
311
313
@@ -382,17 +384,17 @@ To automate this process with Azure Resource Manager templates, see [Create a me
382
384
383
385
## See your availability test results
384
386
385
-
Availability test results can be visualized with both **Line** and **Scatter Plot** views. After a few minutes, select **Refresh** to see your test results.
386
-
387
+
This section explains how to review availability test results in the Azure portal and query the data using [Log Analytics](../logs/log-analytics-overview.md#overview-of-log-analytics-in-azure-monitor). Availability test results can be visualized with both **Line** and **Scatter Plot** views.
388
+
387
389
### Check availability
388
390
389
391
Start by reviewing the graph on the **Availability** tab of your Application Insights resource.
390
392
391
-
####[Standard test](#tab/standard)
393
+
### [Standard test](#tab/standard)
392
394
393
395
:::image type="content" source="./media/monitor-web-app-availability/availability-refresh-002.png" alt-text="Screenshot that shows the Availability page with the Refresh button highlighted.":::
394
396
395
-
####[TrackAvailability](#tab/track)
397
+
### [TrackAvailability](#tab/track)
396
398
397
399
> [!NOTE]
398
400
> Tests created with `TrackAvailability()` will appear with **CUSTOM** next to the test name.
@@ -446,18 +448,7 @@ In addition to the raw results, you can also view two key availability metrics i
446
448
***Availability**: Percentage of the tests that were successful across all test executions.
447
449
***Test Duration**: Average test duration across all test executions.
448
450
449
-
### Custom TrackAvailability test
450
-
451
-
This section explains how to review [TrackAvailability()](/dotnet/api/microsoft.applicationinsights.telemetryclient.trackavailability) test results in the Azure portal and query the data using [Log Analytics](../logs/log-analytics-overview.md#overview-of-log-analytics-in-azure-monitor).
> * Access to the source code of a [function app](../../azure-functions/functions-how-to-use-azure-function-app-settings.md) in Azure Functions
458
-
> * Developer expertise capable of authoring [custom code](#basic-code-sample) for [TrackAvailability()](/dotnet/api/microsoft.applicationinsights.telemetryclient.trackavailability), tailored to your specific business needs
459
-
460
-
#### Query in Log Analytics
451
+
### Query in Log Analytics
461
452
462
453
You can use Log Analytics to view your availability results, dependencies, and more. To learn more about Log Analytics, see [Log query overview](../logs/log-query-overview.md).
0 commit comments