Learn how to monitor and analyze your Azure Storage performance and usage.
This tutorial will guide you through the process of enabling, viewing, and interpreting metrics for your Azure Storage accounts. Understanding your storage metrics is crucial for optimizing performance, managing costs, and ensuring the availability of your applications.
Azure Storage metrics are collected through diagnostic settings. You can configure these settings to send metrics to Azure Monitor Logs (Log Analytics), Event Hubs, or a storage account for archival.
Steps:
StorageMetricsLogs
).Transaction
, StorageRead
, and StorageWrite
.Once diagnostic settings are configured, your metrics will start flowing into Azure Monitor. You can view these metrics in the Metrics explorer.
Steps:
Microsoft.Storage/storageAccounts
) and then choose the desired Metric from the dropdown.Transactions
: Number of successful storage requests.Ingress / Egress
: Amount of data written to/read from storage.Availability
: Percentage of time the storage service is available.Latency (Average, Success Server Latency)
: Average time taken to process a request.API name
to see transaction counts per API operation.For more in-depth analysis, querying your storage logs and metrics in Log Analytics provides powerful capabilities.
Steps:
StorageBlobLogs
, StorageFileLogs
, etc., or you can use a general table like StorageBlobInventoryLogs
for blob metadata. Metrics are often stored in tables like AzureMetrics
.StorageBlobLogs
| where TimeGenerated > ago(1d)
| summarize count() by APIName
| order by count_ desc
StorageBlobLogs
| where TimeGenerated > ago(1d) and OperationName == "GetBlob"
| extend ServerLatencyMs = todouble(ServerLatencyMs)
| summarize avg(ServerLatencyMs) by bin(TimeGenerated, 5m)
| render timechart
AzureMetrics
| where ResourceProvider == "MICROSOFT.STORAGE" and ResourceKind == "AZURESTORAGE"
| where MetricName == "Ingress" or MetricName == "Egress"
| summarize Value = sum(SampledValue) by bin(TimeGenerated, 1h), MetricName
| render timechart
Proactive monitoring is key. Set up alerts in Azure Monitor to be notified when certain metric thresholds are breached.
Steps:
Transactions
, Availability
, Egress
).Threshold type: Static
, Operator: Greater than
, Threshold value: 100000
for transactions per hour).The exact names of logs and metrics might vary slightly based on the Azure Storage service (Blob, File, Queue, Table) and any updates to Azure. Always refer to the official Azure documentation for the most up-to-date information.
Consider creating dashboards in Azure Monitor that combine key storage metrics and Log Analytics queries for a consolidated view of your storage performance and health.