Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Create monitoring alerts for Azure Files
✔️ Applies to: Classic SMB and NFS file shares created with the Microsoft.Storage resource provider
✖️ Doesn't apply to: File shares created with the Microsoft.FileShares resource provider
Azure Monitor alerts proactively notify you when important conditions are found in your monitoring data. They help you identify and address issues in your system before your customers notice them. You can set alerts on metrics, logs, and the activity log.
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.
For more information about alert types and alerts, see Monitor Azure Files.
Metrics to use for alerts
The following table lists some example scenarios to monitor and the proper metric to use for the alert:
Tip
If you create an alert and it's too noisy, adjust the threshold value and alert logic.
| Scenario | Metric to use for alert |
|---|---|
| File share is throttled. | Metric: Transactions Dimension name: Response type Dimension name: File Share (provisioned file shares only) |
| File share size exceeds 80% of capacity. | Metric: Percentage File Share Utilization Dimension name: File Share (provisioned file shares only) |
| File share egress exceeds 500 GiB in one day. | Metric: Egress Dimension name: File Share (provisioned file shares only) |
| File share availability is less than 99.9%. | Metric: Availability Dimension name: File Share (provisioned file shares only) |
How to create an alert if a file share is throttled
To create an alert that notifies you if a file share is throttled, follow these steps:
Open the Create an alert rule dialog box. For more information, see Create or edit an alert rule.
In the Scope tab, select the Select Scope dialog box.
In the Select a resource pane, expand the storage account, check the file resource, and select Apply.
In the Condition tab, select the Transactions metric.
In the Dimension name drop-down list, select Response type.
In the Dimension values drop-down list, select the appropriate response types for your file share.
For pay-as-you-go file shares, select the following response types:
SuccessWithShareIopsThrottlingSuccessWithThrottlingClientShareIopsThrottlingError
For provisioned file shares, select the following response types:
SuccessWithShareEgressThrottlingSuccessWithShareIngressThrottlingSuccessWithShareIopsThrottlingClientShareEgressThrottlingErrorClientShareIngressThrottlingErrorClientShareIopsThrottlingError
Note
If the response types don't appear in the Dimension values drop-down, the resource isn't throttled. To add the dimension values, next to the Dimension values drop-down, 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.
For provisioned file shares, select the Dimension name drop-down and select File Share. For pay-as-you-go file shares, skip to the next step.
Note
If the file share is a pay-as-you-go file share, the File Share dimension doesn't list the file shares because per share metrics aren't available for pay-as-you-go file shares. Throttling alerts for pay-as-you-go file shares trigger if any file share within the storage account is throttled, and the alert doesn't identify which file share was throttled. Because per share metrics aren't available for pay-as-you-go file shares, use the provisioned v2 model instead of the pay-as-you-go model.
Select the Dimension values drop-down and select the file shares that you want to alert on.
Define the alert parameters (threshold value, operator, lookback period, and frequency of evaluation). If you're 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 displays the calculated thresholds based on recent data.
Select the Actions tab to add an action group (email, SMS, and so on) to the alert. You can select an existing action group or create a new action group.
Select the Details tab to fill in the details of the alert such as the alert name, description, and severity.
Select Review + create, and then select Create to create the alert.
How to create an alert if the Azure file share size exceeds 80% of capacity
Go to the storage account that contains the file shares you want to alert on.
From the service menu, select Monitoring > Metrics, and then select + Add metric.
Under Metric Namespace, select File. Under Metric, select Percentage File Share Utilization. You can either view the average utilization for the storage account, or select Apply splitting to view the metric for individual file shares.
Select New alert rule. On the Condition tab of the Create an alert rule dialog box, under Signal name, you see Percentage File Share Utilization.
Under Alert logic, enter the Threshold value as a percentage. For example, if you want to receive an alert when the file share size exceeds 80% of capacity, enter a threshold value of 80, and under Value is, select Greater than.
For provisioned file shares, select the Dimension name drop-down list, and then select File Share. For pay-as-you-go file shares, skip to the next step.
Note
If the file share is a pay-as-you-go file share, the File Share dimension doesn't list the file shares because per share metrics aren't available for pay-as-you-go file shares. Throttling alerts for pay-as-you-go file shares trigger if any file share within the storage account is throttled, and the alert doesn't identify which file share was throttled. If you want per share metrics, use the provisioned v2 model instead of the pay-as-you-go model.
Select the Dimension values drop-down and select the file shares that you want to alert on.
Under When to evaluate, specify the desired evaluation frequency and lookback period.
Select the Details tab and provide a name for the alert rule as well as a severity level and optional description.
Optional: Select the Actions tab to add an action group (email, SMS, and so on) to the alert. Select an existing action group or create a new action group.
Select Review + create, then select Create to create the alert.
How to create an alert if the Azure file share egress exceeds 500 GiB in a day
Open the Create an alert rule dialog box. For more information, see Create or edit an alert rule.
In the Scope tab, select the Select Scope dialog box.
In the Select a resource pane, expand the storage account, check the file resource, and select Apply.
In the Condition tab of the Create an alert rule dialog box, select the Egress metric.
For provisioned file shares, select the Dimension name drop-down list and select File Share. For pay-as-you-go file shares, skip to the next step.
Note
If the file share is a pay-as-you-go file share, the File Share dimension doesn't list the file shares because per share metrics aren't available for pay-as-you-go file shares. Throttling alerts for pay-as-you-go file shares trigger if any file share within the storage account is throttled, and the alert doesn't identify which file share was throttled. Because per share metrics aren't available for pay-as-you-go file shares, use the provisioned v2 model instead of the pay-as-you-go model.
Select the Dimension values drop-down and select the file shares that you want to alert on.
Enter 536870912000 bytes for Threshold value.
From the Check every drop-down list, select the frequency of evaluation.
Select the Actions tab to add an action group (email, SMS, and so on) to the alert. You can select an existing action group or create a new action group.
Select the Details tab to fill in the details of the alert such as the alert name, description, and severity.
Select Review + create, and then select Create to create the alert.
How to create an alert for high server latency
To create an alert for high server latency (average), follow these steps.
Open the Create an alert rule dialog box. For more information, see Create or edit an alert rule.
In the Scope tab, select the Select Scope dialog box.
In the Select a resource pane, expand the storage account, check the file resource, and select Apply.
In the Condition tab of the Create an alert rule dialog box, select the Success Server Latency metric.
Select the Dimension values drop-down and select the file shares that you want to alert on.
Note
To alert on the overall latency experience, leave Dimension values unchecked. To alert on the latency of specific transactions, select the API Name in the drop-down list. For example, selecting the Read and Write API names with the equal operator only displays latency for data transactions. Selecting the Read and Write API name with the not equal operator only displays latency for metadata transactions.
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. 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 displays the calculated thresholds based on recent data. Use the Dynamic logic with Medium threshold sensitivity and adjust as needed. To learn more, see Understanding dynamic thresholds.
Define the lookback period and frequency of evaluation.
Select the Actions tab to add an action group (email, SMS, and so on) to the alert. Select an existing action group or create a new action group.
Select the Details tab to fill in the details of the alert such as the alert name, description, and severity.
Select Review + create, and then select Create to create the alert.
How to create an alert if the Azure file share availability is less than 99.9%
Open the Create an alert rule dialog box. For more information, see Create or edit an alert rule.
In the Scope tab, select the Select Scope dialog box.
In the Select a resource pane, expand the storage account, check the file resource, and select Apply.
In the Condition tab, select the Availability metric.
In the Alert logic section, enter the following values:
- Threshold = Static
- Aggregation type = Average
- Operator = Less than
- Threshold value = 99.9
In the Split by dimensions section:
- Select the Dimension name drop-down and select File Share.
- Select the Dimension values drop-down and select the file shares that you want to alert on.
Note
If the file share is a pay-as-you-go file share, the File Share dimension doesn't list the file shares because per share metrics aren't available for pay-as-you-go file shares. Availability alerts for pay-as-you-go file shares are at the storage account level. If possible, use the provisioned v2 model instead of the pay-as-you-go model.
In the When to evaluate section, select the following values:
- Check every = 5 minutes
- Lookback period = 1 hour
Select Next to go to the Actions tab and add an action group (email, SMS, and so on) to the alert. Select an existing action group or create a new action group.
Select Next to go to the Details tab and fill in the details of the alert such as the alert name, description, and severity.
Select Review + create, and then select Create to create the alert.
Related content
Feedback
Was this page helpful?
