Azure Storage Monitoring
Monitoring Features
There are two features available in Azure for storage monitoring.
- Continuous Monitoring: Azure provides various metrics that are available at both the storage account level and the individual service level. Azure collects these metrics every hour, and we can define graphs based on these metrics and display them on the dashboard. We’ll see how to do this below.
- Logging: We can enable client-side logging using the Azure Storage Client Library. And we can enable network and server logging using the Azure Storage Analytics Library. All of these loggings can be used to monitor an individual’s transactions for continuous monitoring. These metrics aggregate data, so we can’t see an individual’s transaction. But by enabling logging, we can investigate by going into the individual’s transaction.
Monitoring tools
The essential tools we use to monitor storage are audio storage analytics, see below:
- Azure Storage Analytics performs logging and quickly provides data for the storage account. We can use this data to track requests, analyze usage trends, and diagnose problems with our storage account.
- Metrics are enabled by default when we create a storage account. We can enable logging using the Azure portal, Rest APIs, or the Client library. Metric uses the Get Blob Service Properties, Get Queue Service Properties, Get Table Service Properties, and Get File Service Properties operations to enable storage analytics for all services.
- The combined data resides in a well-known blob (for logging) and well-known tables (for metrics), which can use the respective API services.
- Storage Analytics has a 20TB limit on the amount of data stored, which is independent of your total storage account limit.
Storage Analysis Logging
Storage Analytics records detailed information about successful and failed requests to a storage service. This data can be used to monitor individual requests and to diagnose problems with a storage service. Both authenticated and anonymous requests will be logged, but at different levels. All logs are stored as blocks inside a container called $logs. This container is automatically created when you enable Storage Analytics for a storage account. The ($logs) container is located in the storage account’s blob namespace.
The logs are written in the following format:
<service-name>/YYYY/MM/DD/hhmm/<counter>.log
Storage Analysis Metrics
Storage Analytics stores metrics, which include combined transaction statistics and capacity data regarding demand on a storage service. There are two types of storage analytics metrics.
Transaction metrics
- Azure records aggregated transaction data every hour or minute, such as read, write, update, etc.
- Data is recorded at the service and API operation level.
Capacity measurements
- Capacity data is recorded daily for a storage account’s Blob service, which includes the number of capacity containers, number of objects, etc.
All metric data for each of the storage services is located in three tables reserved for that service.
