Skip to content

Commit fed0165

Browse files
Merge pull request #265160 from v-thepet/files-monitor
Azure Monitor horizontals - Azure Files
2 parents e1b31cb + 5993426 commit fed0165

File tree

5 files changed

+333
-199
lines changed

5 files changed

+333
-199
lines changed

articles/storage/files/TOC.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@
243243
items:
244244
- name: Monitor Azure Files
245245
href: storage-files-monitoring.md
246-
- name: Analyze metrics and logs
246+
- name: Analyze metrics
247247
href: analyze-files-metrics.md
248248
- name: Create alerts
249-
href: files-monitoring-alerts.md
249+
href: files-monitoring-alerts.md
250250
- name: Application development
251251
items:
252252
- name: Configure connection strings
@@ -313,7 +313,7 @@
313313
href: ../common/storage-compliance-offerings.md?toc=/azure/storage/files/toc.json
314314
- name: Use Azure independent clouds
315315
href: ../common/storage-powershell-independent-clouds.md?toc=/azure/storage/files/toc.json
316-
- name: Monitoring Azure Files reference
316+
- name: Monitoring data reference
317317
href: storage-files-monitoring-reference.md
318318
- name: Resource Manager template
319319
displayName: arm

articles/storage/files/analyze-files-metrics.md

Lines changed: 22 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@ author: khdownie
55
services: storage
66
ms.service: azure-file-storage
77
ms.topic: how-to
8-
ms.date: 09/06/2023
8+
ms.date: 02/13/2024
99
ms.author: kendownie
1010
ms.custom: monitoring, devx-track-azurepowershell
1111
---
1212

1313
# Analyze Azure Files metrics using Azure Monitor
1414

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.
1618

1719
## Applies to
1820
| File share type | SMB | NFS |
@@ -23,16 +25,24 @@ Understanding how to monitor file share performance is critical to ensuring that
2325

2426
## Supported metrics
2527

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:
2729

28-
### [Azure portal](#tab/azure-portal)
30+
- Microsoft.Storage/storageAccounts
31+
- Microsoft.Storage/storageAccounts/fileServices
2932

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).
3134

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).
3336

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).
3646

3747
### [PowerShell](#tab/azure-powershell)
3848

@@ -104,7 +114,7 @@ Azure Monitor provides the [.NET SDK](https://www.nuget.org/packages/Microsoft.A
104114

105115
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.
106116

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).
108118

109119
### List the account-level metric definition
110120

@@ -314,85 +324,11 @@ Compared against the **Bandwidth by Max MiB/s**, we achieved 123 MiB/s at peak.
314324

315325
:::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":::
316326

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).
390-
391-
## Next steps
327+
## Related content
392328

393329
- [Monitor Azure Files](storage-files-monitoring.md)
394-
- [Create monitoring alerts for Azure Files](files-monitoring-alerts.md)
395330
- [Azure Files monitoring data reference](storage-files-monitoring-reference.md)
396-
- [Monitor Azure resources with Azure Monitor](../../azure-monitor/essentials/monitor-azure-resource.md)
331+
- [Create monitoring alerts for Azure Files](files-monitoring-alerts.md)
332+
- [Monitor Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource)
397333
- [Understand Azure Files performance](understand-performance.md)
398334
- [Troubleshoot ClientOtherErrors](/troubleshoot/azure/azure-storage/files-client-other-errors?toc=/azure/storage/files/toc.json)

articles/storage/files/files-monitoring-alerts.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@ author: khdownie
55
services: storage
66
ms.service: azure-file-storage
77
ms.topic: how-to
8-
ms.date: 09/06/2023
8+
ms.date: 02/13/2024
99
ms.author: kendownie
1010
ms.custom: monitoring
1111
---
1212

1313
# Create monitoring alerts for Azure Files
1414

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).
1616

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).
1820

1921
## Applies to
2022
| File share type | SMB | NFS |
@@ -40,7 +42,7 @@ The following table lists some example scenarios to monitor and the proper metri
4042

4143
To create an alert that will notify you if a file share is being throttled, follow these steps.
4244

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).
4446

4547
2. In the **Condition** tab, select the **Transactions** metric.
4648

@@ -86,7 +88,7 @@ To create an alert that will notify you if a file share is being throttled, foll
8688

8789
## How to create an alert if the Azure file share size is 80% of capacity
8890

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).
9092

9193
2. In the **Condition** tab of the **Create an alert rule** dialog box, select the **File Capacity** metric.
9294

@@ -109,7 +111,7 @@ To create an alert that will notify you if a file share is being throttled, foll
109111

110112
## How to create an alert if the Azure file share egress has exceeded 500 GiB in a day
111113

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).
113115

114116
2. In the **Condition** tab of the **Create an alert rule** dialog box, select the **Egress** metric.
115117

@@ -134,7 +136,7 @@ To create an alert that will notify you if a file share is being throttled, foll
134136

135137
To create an alert for high server latency (average), follow these steps.
136138

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).
138140

139141
2. In the **Condition** tab of the **Create an alert rule** dialog box, select the **Success Server Latency** metric.
140142

@@ -146,7 +148,7 @@ To create an alert for high server latency (average), follow these steps.
146148
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.
147149

148150
> [!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).
150152
151153
5. Define the lookback period and frequency of evaluation.
152154

@@ -156,10 +158,10 @@ To create an alert for high server latency (average), follow these steps.
156158

157159
8. Select **Review + create** to create the alert.
158160

159-
## Next steps
161+
## Related content
160162

161163
- [Monitor Azure Files](storage-files-monitoring.md)
162-
- [Analyze Azure Files metrics using Azure Monitor](analyze-files-metrics.md)
163164
- [Azure Files monitoring data reference](storage-files-monitoring-reference.md)
164-
- [Monitor Azure resources with Azure Monitor](../../azure-monitor/essentials/monitor-azure-resource.md)
165+
- [Analyze Azure Files metrics](analyze-files-metrics.md)
166+
- [Monitor Azure resources with Azure Monitor](/azure/azure-monitor/essentials/monitor-azure-resource)
165167
- [Azure Storage metrics migration](../common/storage-metrics-migration.md)

0 commit comments

Comments
 (0)