|
| 1 | +--- |
| 2 | +title: Monitoring Azure Files - Create alerts |
| 3 | +description: Use Azure Monitor to create alerts on throttling, capacity, and egress. Learn how to create an alert on high server latency. |
| 4 | +author: khdownie |
| 5 | +services: storage |
| 6 | +ms.service: azure-file-storage |
| 7 | +ms.topic: how-to |
| 8 | +ms.date: 09/05/2023 |
| 9 | +ms.author: kendownie |
| 10 | +ms.custom: monitoring |
| 11 | +--- |
| 12 | + |
| 13 | +# Monitoring Azure Files - Create alerts |
| 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). |
| 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). |
| 18 | + |
| 19 | +## Applies to |
| 20 | +| File share type | SMB | NFS | |
| 21 | +|-|:-:|:-:| |
| 22 | +| Standard file shares (GPv2), LRS/ZRS |  |  | |
| 23 | +| Standard file shares (GPv2), GRS/GZRS |  |  | |
| 24 | +| Premium file shares (FileStorage), LRS/ZRS |  |  | |
| 25 | + |
| 26 | +## Metrics to use for alerts |
| 27 | + |
| 28 | +The following table lists some example scenarios to monitor and the proper metric to use for the alert: |
| 29 | + |
| 30 | +> [!TIP] |
| 31 | +> If you create an alert and it's too noisy, adjust the threshold value and alert logic. |
| 32 | +
|
| 33 | +| Scenario | Metric to use for alert | |
| 34 | +|-|-| |
| 35 | +| File share is throttled. | Metric: Transactions<br>Dimension name: Response type <br>Dimension name: FileShare (premium file share only) | |
| 36 | +| File share size is 80% of capacity. | Metric: File Capacity<br>Dimension name: FileShare (premium file share only) | |
| 37 | +| File share egress has exceeded 500 GiB in one day. | Metric: Egress<br>Dimension name: FileShare (premium file share only) | |
| 38 | + |
| 39 | +## How to create an alert if a file share is throttled |
| 40 | + |
| 41 | +To create an alert that will notify you if a file share is being throttled, follow these steps. |
| 42 | + |
| 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). |
| 44 | + |
| 45 | +2. In the **Condition** tab, select the **Transactions** metric. |
| 46 | + |
| 47 | +3. In the **Dimension name** drop-down list, select **Response type**. |
| 48 | + |
| 49 | +4. In the **Dimension values** drop-down list, select the appropriate response types for your file share. |
| 50 | + |
| 51 | + For standard file shares, select the following response types: |
| 52 | + |
| 53 | + - `SuccessWithShareIopsThrottling` |
| 54 | + - `SuccessWithThrottling` |
| 55 | + - `ClientShareIopsThrottlingError` |
| 56 | + |
| 57 | + For premium file shares, select the following response types: |
| 58 | + |
| 59 | + - `SuccessWithShareEgressThrottling` |
| 60 | + - `SuccessWithShareIngressThrottling` |
| 61 | + - `SuccessWithShareIopsThrottling` |
| 62 | + - `ClientShareEgressThrottlingError` |
| 63 | + - `ClientShareIngressThrottlingError` |
| 64 | + - `ClientShareIopsThrottlingError` |
| 65 | + |
| 66 | + > [!NOTE] |
| 67 | + > If the response types aren't listed in the **Dimension values** drop-down, this means the resource hasn't been throttled. To add the dimension values, next to the **Dimension values** drop-down list, select **Add custom value**, enter the response type (for example, **SuccessWithThrottling**), select **OK**, and then repeat these steps to add all applicable response types for your file share. |
| 68 | +
|
| 69 | +5. For **premium file shares**, select the **Dimension name** drop-down and select **File Share**. For **standard file shares**, skip to step 7. |
| 70 | + |
| 71 | + > [!NOTE] |
| 72 | + > If the file share is a standard file share, the **File Share** dimension won't list the file share(s) because per-share metrics aren't available for standard file shares. Throttling alerts for standard file shares will be triggered if any file share within the storage account is throttled, and the alert will not identify which file share was throttled. Since per-share metrics aren't available for standard file shares, the recommendation is to have one file share per storage account. |
| 73 | +
|
| 74 | +6. Select the **Dimension values** drop-down and select the file share(s) that you want to alert on. |
| 75 | + |
| 76 | +7. Define the alert parameters (threshold value, operator, lookback period, and frequency of evaluation). |
| 77 | + |
| 78 | + > [!TIP] |
| 79 | + > If you are using a static threshold, the metric chart can help determine a reasonable threshold value if the file share is currently being throttled. If you're using a dynamic threshold, the metric chart will display the calculated thresholds based on recent data. |
| 80 | +
|
| 81 | +8. Select the **Actions** tab to add an action group (email, SMS, etc.) to the alert. You can select an existing action group or create a new action group. |
| 82 | + |
| 83 | +9. Select the **Details** tab to fill in the details of the alert such as the alert name, description, and severity. |
| 84 | + |
| 85 | +10. Select **Review + create** to create the alert. |
| 86 | + |
| 87 | +## How to create an alert if the Azure file share size is 80% of capacity |
| 88 | + |
| 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). |
| 90 | + |
| 91 | +2. In the **Condition** tab of the **Create an alert rule** dialog box, select the **File Capacity** metric. |
| 92 | + |
| 93 | +3. For **premium file shares**, select the **Dimension name** drop-down list, and then select **File Share**. For **standard file shares**, skip to step 5. |
| 94 | + |
| 95 | + > [!NOTE] |
| 96 | + > If the file share is a standard file share, the **File Share** dimension will not list the file share(s) because per-share metrics are not available for standard file shares. Alerts for standard file shares are based on all file shares in the storage account. Since per-share metrics are not available for standard file shares, the recommendation is to have one file share per storage account. |
| 97 | +
|
| 98 | +4. Select the **Dimension values** drop-down and select the file share(s) that you want to alert on. |
| 99 | + |
| 100 | +5. Enter the **Threshold value** in bytes. For example, if the file share size is 100 TiB and you want to receive an alert when the file share size is 80% of capacity, the threshold value in bytes is 87960930222080. |
| 101 | + |
| 102 | +6. Define the alert parameters (threshold value, operator, lookback period, and frequency of evaluation). |
| 103 | + |
| 104 | +7. Select the **Actions** tab to add an action group (email, SMS, etc.) to the alert. You can select an existing action group or create a new action group. |
| 105 | + |
| 106 | +8. Select the **Details** tab to fill in the details of the alert such as the alert name, description, and severity. |
| 107 | + |
| 108 | +9. Select **Review + create** to create the alert. |
| 109 | + |
| 110 | +## How to create an alert if the Azure file share egress has exceeded 500 GiB in a day |
| 111 | + |
| 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). |
| 113 | + |
| 114 | +2. In the **Condition** tab of the **Create an alert rule** dialog box, select the **Egress** metric. |
| 115 | + |
| 116 | +3. For **premium file shares**, select the **Dimension name** drop-down list and select **File Share**. For **standard file shares**, skip to step 5. |
| 117 | + |
| 118 | + > [!NOTE] |
| 119 | + > If the file share is a standard file share, the **File Share** dimension will not list the file share(s) because per-share metrics aren't available for standard file shares. Alerts for standard file shares are based on all file shares in the storage account. Since per-share metrics aren't available for standard file shares, the recommendation is to have one file share per storage account. |
| 120 | +
|
| 121 | +4. Select the **Dimension values** drop-down and select the file share(s) that you want to alert on. |
| 122 | + |
| 123 | +5. Enter **536870912000** bytes for Threshold value. |
| 124 | + |
| 125 | +6. From the **Check every** drop-down list, select the frequency of evaluation. |
| 126 | + |
| 127 | +7. Select the **Actions** tab to add an action group (email, SMS, etc.) to the alert. You can select an existing action group or create a new action group. |
| 128 | + |
| 129 | +8. Select the **Details** tab to fill in the details of the alert such as the alert name, description, and severity. |
| 130 | + |
| 131 | +9. Select **Review + create** to create the alert. |
| 132 | + |
| 133 | +## Next steps |
| 134 | + |
| 135 | +- [Azure Files monitoring data reference](storage-files-monitoring-reference.md) |
| 136 | +- [Monitor Azure resources with Azure Monitor](../../azure-monitor/essentials/monitor-azure-resource.md) |
| 137 | +- [Azure Storage metrics migration](../common/storage-metrics-migration.md) |
0 commit comments