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/storage/files/analyze-files-metrics.md
+22-86Lines changed: 22 additions & 86 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,14 +5,16 @@ author: khdownie
5
5
services: storage
6
6
ms.service: azure-file-storage
7
7
ms.topic: how-to
8
-
ms.date: 09/06/2023
8
+
ms.date: 02/13/2024
9
9
ms.author: kendownie
10
10
ms.custom: monitoring, devx-track-azurepowershell
11
11
---
12
12
13
13
# Analyze Azure Files metrics using Azure Monitor
14
14
15
-
Understanding how to monitor file share performance is critical to ensuring that your application is running as efficiently as possible. This article shows you how to use [Azure Monitor](../../azure-monitor/overview.md) to analyze Azure Files metrics such as availability, latency, and utilization.
15
+
Understanding how to monitor file share performance is critical to ensuring that your application is running as efficiently as possible. This article shows you how to use [Azure Monitor](/azure/azure-monitor/overview) to analyze Azure Files metrics such as availability, latency, and utilization.
16
+
17
+
See [Monitor Azure Files](storage-files-monitoring.md) for details on the monitoring data you can collect for Azure Files and how to use it.
16
18
17
19
## Applies to
18
20
| File share type | SMB | NFS |
@@ -23,16 +25,24 @@ Understanding how to monitor file share performance is critical to ensuring that
23
25
24
26
## Supported metrics
25
27
26
-
For a list of all Azure Monitor support metrics, which includes Azure Files, see [Azure Monitor supported metrics](../../azure-monitor/essentials/metrics-supported.md#microsoftstoragestorageaccountsfileservices).
28
+
Metrics for Azure Files are in these namespaces:
27
29
28
-
### [Azure portal](#tab/azure-portal)
30
+
- Microsoft.Storage/storageAccounts
31
+
- Microsoft.Storage/storageAccounts/fileServices
29
32
30
-
You can analyze metrics for Azure Storage with metrics from other Azure services by using Metrics Explorer. Open Metrics Explorer by choosing **Metrics** from the **Azure Monitor** menu. For details on using this tool, see [Analyze metrics with Azure Monitor metrics explorer](../../azure-monitor/essentials/analyze-metrics.md).
33
+
For a list of available metrics for Azure Files, see [Azure Files monitoring data reference](storage-files-monitoring-reference.md#supported-metrics-for-microsoftstoragestorageaccountsfileservices).
31
34
32
-
For metrics that support dimensions, you can filter the metric with the desired dimension value. For a complete list of the dimensions that Azure Storage supports, see [Metrics dimensions](storage-files-monitoring-reference.md#metrics-dimensions). Metrics for Azure Files are in these namespaces:
35
+
For a list of all Azure Monitor supported metrics, which includes Azure Files, see [Azure Monitor supported metrics](/azure/azure-monitor/reference/supported-metrics/metrics-index#supported-metrics-per-resource-type).
33
36
34
-
- Microsoft.Storage/storageAccounts
35
-
- Microsoft.Storage/storageAccounts/fileServices
37
+
## View Azure Files metrics data
38
+
39
+
You can view Azure Files metrics by using the Azure portal, PowerShell, Azure CLI, or .NET.
40
+
41
+
### [Azure portal](#tab/azure-portal)
42
+
43
+
You can analyze metrics for Azure Storage with metrics from other Azure services by using Azure Monitor Metrics Explorer. Open metrics explorer by choosing **Metrics** from the **Azure Monitor** menu. For details on using this tool, see [Analyze metrics with Azure Monitor metrics explorer](/azure/azure-monitor/essentials/analyze-metrics).
44
+
45
+
For metrics that support dimensions, you can filter the metric with the desired dimension value. For a complete list of the dimensions that Azure Storage supports, see [Metrics dimensions](storage-files-monitoring-reference.md#metrics-dimensions).
36
46
37
47
### [PowerShell](#tab/azure-powershell)
38
48
@@ -104,7 +114,7 @@ Azure Monitor provides the [.NET SDK](https://www.nuget.org/packages/Microsoft.A
104
114
105
115
In these examples, replace the `<resource-ID>` placeholder with the resource ID of the entire storage account or the Azure Files service. You can find these resource IDs on the **Properties** pages of your storage account in the Azure portal.
106
116
107
-
Replace the `<subscription-ID>` variable with the ID of your subscription. For guidance on how to obtain values for `<tenant-ID>`, `<application-ID>`, and `<AccessKey>`, see [Use the portal to create a Microsoft Entra application and service principal that can access resources](../../active-directory/develop/howto-create-service-principal-portal.md).
117
+
Replace the `<subscription-ID>` variable with the ID of your subscription. For guidance on how to obtain values for `<tenant-ID>`, `<application-ID>`, and `<AccessKey>`, see [Use the portal to create a Microsoft Entra application and service principal that can access resources](/azure/active-directory/develop/howto-create-service-principal-portal).
108
118
109
119
### List the account-level metric definition
110
120
@@ -314,85 +324,11 @@ Compared against the **Bandwidth by Max MiB/s**, we achieved 123 MiB/s at peak.
314
324
315
325
:::image type="content" source="media/analyze-files-metrics/bandwidth-by-max-mibs.png" alt-text="Screenshot showing bandwidth by max MIBS." lightbox="media/analyze-files-metrics/bandwidth-by-max-mibs.png" border="false":::
316
326
317
-
## Analyze logs
318
-
319
-
You can access resource logs either as a blob in a storage account, as event data, or through Log Analytics queries. For information about how to find those logs, see [Azure resource logs](../../azure-monitor/essentials/resource-logs.md).
320
-
321
-
All resource logs in Azure Monitor have the same fields followed by service-specific fields. The common schema is outlined in [Azure Monitor resource log schema](../../azure-monitor/essentials/resource-logs-schema.md). The schema for Azure Files resource logs is found in [Azure Files monitoring data reference](storage-files-monitoring-reference.md).
322
-
323
-
To get the list of SMB and REST operations that are logged, see [Storage logged operations and status messages](/rest/api/storageservices/storage-analytics-logged-operations-and-status-messages).
324
-
325
-
Log entries are created only if there are requests made against the service endpoint. For example, if a storage account has activity in its file endpoint but not in its table or queue endpoints, only logs that pertain to the Azure File service are created. Azure Storage logs contain detailed information about successful and failed requests to a storage service. This information can be used to monitor individual requests and to diagnose issues with a storage service. Requests are logged on a best-effort basis.
326
-
327
-
The [Activity log](../../azure-monitor/essentials/activity-log.md) is a type of platform log located in Azure that provides insight into subscription-level events. You can view it independently or route it to Azure Monitor Logs, where you can do much more complex queries using Log Analytics.
328
-
329
-
330
-
### Log authenticated requests
331
-
332
-
The following types of authenticated requests are logged:
333
-
334
-
- Successful requests
335
-
- Failed requests, including timeout, throttling, network, authorization, and other errors
336
-
- Requests that use Kerberos, NTLM or shared access signature (SAS), including failed and successful requests
337
-
- Requests to analytics data (classic log data in the **$logs** container and classic metric data in the **$metric** tables)
338
-
339
-
Requests made by the Azure Files service itself, such as log creation or deletion, aren't logged. For a full list of the SMB and REST requests that are logged, see [Storage logged operations and status messages](/rest/api/storageservices/storage-analytics-logged-operations-and-status-messages) and [Azure Files monitoring data reference](storage-files-monitoring-reference.md).
340
-
341
-
### Sample Kusto queries
342
-
343
-
If you send logs to Log Analytics, you can access those logs by using Azure Monitor log queries. For more information, see [Log Analytics tutorial](../../azure-monitor/logs/log-analytics-tutorial.md).
344
-
345
-
Here are some queries that you can enter in the **Log search** bar to help you monitor your Azure Files. These queries work with the [new language](../../azure-monitor/logs/log-query-overview.md).
346
-
347
-
> [!IMPORTANT]
348
-
> When you select **Logs** from the storage account resource group menu, Log Analytics is opened with the query scope set to the current resource group. This means that log queries will only include data from that resource group. If you want to run a query that includes data from other resources or data from other Azure services, select **Logs** from the **Azure Monitor** menu. See [Log query scope and time range in Azure Monitor Log Analytics](../../azure-monitor/logs/scope.md) for details.
349
-
350
-
Use these queries to help you monitor your Azure file shares:
351
-
352
-
- View SMB errors over the last week
353
-
354
-
```Kusto
355
-
StorageFileLogs
356
-
| where Protocol == "SMB" and TimeGenerated >= ago(7d) and StatusCode contains "-"
357
-
| sort by StatusCode
358
-
```
359
-
- Create a pie chart of SMB operations over the last week
360
-
361
-
```Kusto
362
-
StorageFileLogs
363
-
| where Protocol == "SMB" and TimeGenerated >= ago(7d)
364
-
| summarize count() by OperationName
365
-
| sort by count_ desc
366
-
| render piechart
367
-
```
368
-
369
-
- View REST errors over the last week
370
-
371
-
```Kusto
372
-
StorageFileLogs
373
-
| where Protocol == "HTTPS" and TimeGenerated >= ago(7d) and StatusText !contains "Success"
374
-
| sort by StatusText asc
375
-
```
376
-
377
-
- Create a pie chart of REST operations over the last week
378
-
379
-
```Kusto
380
-
StorageFileLogs
381
-
| where Protocol == "HTTPS" and TimeGenerated >= ago(7d)
382
-
| summarize count() by OperationName
383
-
| sort by count_ desc
384
-
| render piechart
385
-
```
386
-
387
-
To view the list of column names and descriptions for Azure Files, see [StorageFileLogs](/azure/azure-monitor/reference/tables/storagefilelogs).
388
-
389
-
For more information on how to write queries, see [Log Analytics tutorial](../../azure-monitor/logs/log-analytics-tutorial.md).
Copy file name to clipboardExpand all lines: articles/storage/files/files-monitoring-alerts.md
+13-11Lines changed: 13 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,16 +5,18 @@ author: khdownie
5
5
services: storage
6
6
ms.service: azure-file-storage
7
7
ms.topic: how-to
8
-
ms.date: 09/06/2023
8
+
ms.date: 02/13/2024
9
9
ms.author: kendownie
10
10
ms.custom: monitoring
11
11
---
12
12
13
13
# Create monitoring alerts for Azure Files
14
14
15
-
Azure Monitor alerts proactively notify you when important conditions are found in your monitoring data. They allow you to identify and address issues in your system before your customers notice them. You can set alerts on [metrics](../../azure-monitor/alerts/alerts-metric-overview.md), [logs](../../azure-monitor/alerts/alerts-unified-log.md), and the [activity log](../../azure-monitor/alerts/activity-log-alerts.md).
15
+
Azure Monitor alerts proactively notify you when important conditions are found in your monitoring data. They allow you to identify and address issues in your system before your customers notice them. You can set alerts on [metrics](/azure/azure-monitor/alerts/alerts-metric-overview), [logs](/azure/azure-monitor/alerts/alerts-unified-log), and the [activity log](/azure/azure-monitor/alerts/activity-log-alerts).
16
16
17
-
To learn more about how to create an alert, see [Create or edit an alert rule](../../azure-monitor/alerts/alerts-create-new-alert-rule.md).
17
+
This article shows you how to create alerts on throttling, capacity, egress, and high server latency. To learn more about creating alerts, see [Create or edit an alert rule](/azure/azure-monitor/alerts/alerts-create-new-alert-rule).
18
+
19
+
For more information about alert types and alerts, see [Monitor Azure Files](storage-files-monitoring.md#alerts).
18
20
19
21
## Applies to
20
22
| File share type | SMB | NFS |
@@ -40,7 +42,7 @@ The following table lists some example scenarios to monitor and the proper metri
40
42
41
43
To create an alert that will notify you if a file share is being throttled, follow these steps.
42
44
43
-
1. Open the **Create an alert rule** dialog box. For more information, see [Create or edit an alert rule](../../azure-monitor/alerts/alerts-create-new-alert-rule.md).
45
+
1. Open the **Create an alert rule** dialog box. For more information, see [Create or edit an alert rule](/azure/azure-monitor/alerts/alerts-create-new-alert-rule).
44
46
45
47
2. In the **Condition** tab, select the **Transactions** metric.
46
48
@@ -86,7 +88,7 @@ To create an alert that will notify you if a file share is being throttled, foll
86
88
87
89
## How to create an alert if the Azure file share size is 80% of capacity
88
90
89
-
1. Open the **Create an alert rule** dialog box. For more information, see [Create or edit an alert rule](../../azure-monitor/alerts/alerts-create-new-alert-rule.md).
91
+
1. Open the **Create an alert rule** dialog box. For more information, see [Create or edit an alert rule](/azure/azure-monitor/alerts/alerts-create-new-alert-rule).
90
92
91
93
2. In the **Condition** tab of the **Create an alert rule** dialog box, select the **File Capacity** metric.
92
94
@@ -109,7 +111,7 @@ To create an alert that will notify you if a file share is being throttled, foll
109
111
110
112
## How to create an alert if the Azure file share egress has exceeded 500 GiB in a day
111
113
112
-
1. Open the **Create an alert rule** dialog box. For more information, see [Create or edit an alert rule](../../azure-monitor/alerts/alerts-create-new-alert-rule.md).
114
+
1. Open the **Create an alert rule** dialog box. For more information, see [Create or edit an alert rule](/azure/azure-monitor/alerts/alerts-create-new-alert-rule).
113
115
114
116
2. In the **Condition** tab of the **Create an alert rule** dialog box, select the **Egress** metric.
115
117
@@ -134,7 +136,7 @@ To create an alert that will notify you if a file share is being throttled, foll
134
136
135
137
To create an alert for high server latency (average), follow these steps.
136
138
137
-
1. Open the **Create an alert rule** dialog box. For more information, see [Create or edit an alert rule](../../azure-monitor/alerts/alerts-create-new-alert-rule.md).
139
+
1. Open the **Create an alert rule** dialog box. For more information, see [Create or edit an alert rule](/azure/azure-monitor/alerts/alerts-create-new-alert-rule).
138
140
139
141
2. In the **Condition** tab of the **Create an alert rule** dialog box, select the **Success Server Latency** metric.
140
142
@@ -146,7 +148,7 @@ To create an alert for high server latency (average), follow these steps.
146
148
4. Define the **Alert Logic** by selecting either Static or Dynamic. For Static, select **Average** Aggregation, **Greater than** Operator, and Threshold value. For Dynamic, select **Average** Aggregation, **Greater than** Operator, and Threshold Sensitivity.
147
149
148
150
> [!TIP]
149
-
> If you're using a static threshold, the metric chart can help determine a reasonable threshold value if the file share is currently experiencing high latency. If you're using a dynamic threshold, the metric chart will display the calculated thresholds based on recent data. We recommend using the Dynamic logic with Medium threshold sensitivity and further adjust as needed. To learn more, see [Understanding dynamic thresholds](../../azure-monitor/alerts/alerts-dynamic-thresholds.md#understand-dynamic-thresholds-charts).
151
+
> If you're using a static threshold, the metric chart can help determine a reasonable threshold value if the file share is currently experiencing high latency. If you're using a dynamic threshold, the metric chart will display the calculated thresholds based on recent data. We recommend using the Dynamic logic with Medium threshold sensitivity and further adjust as needed. To learn more, see [Understanding dynamic thresholds](/azure/azure-monitor/alerts/alerts-dynamic-thresholds#understand-dynamic-thresholds-charts).
150
152
151
153
5. Define the lookback period and frequency of evaluation.
152
154
@@ -156,10 +158,10 @@ To create an alert for high server latency (average), follow these steps.
156
158
157
159
8. Select **Review + create** to create the alert.
0 commit comments