Learn how to discover issues before problems arise by viewing the Storage Account logs using the new Azure Storage Explorer tool.
- [Lecturer] Now that we've enabled logging and set up a retention policy, we can now view the logs. My favorite new tool is the Microsoft Azure Storage Explorer which is currently in preview. You can also use the activity log analytics blade within the portal. Logs can also be viewed using other tools such as Visual Studio or using the REST api. You can also use the AZCopy tool to automatically download the log files for further review or processing.
Monitoring records capacity and metrics. Capacity provides information on how much space is used in an account, the number of containers within an account and the number of objects. Metrics provides information about how the storage account is performing. Metrics include the availability, average response time, ingress and egress and network errors for the storage account. You will see a variety of information that will be gathered during the demo itself.
You will find the metrics for each service in a corresponding account. For example, you will find the metrics for the blobs in the MetricsTransactionsBlob log. And, similarly, for the table queue and blob capacity as well. Logging is different than monitoring, in that logging actually logs requests being sent to the account. You use logging to analyze the application health. And you will find the logs container within the blob container. Let's go ahead, jump into the demo so you can see the details that are gathered using both monitoring and logging.
I've logged into the Microsoft Azure Storage Explorer. I've already connected my accounts. And we're going to go ahead and focus in on the logging metrics storage account. This is the account that we previously set up. We'll start in the blob containers. And, here you'll see, we have our blobs logs. These will be for blob, queue and table. We're going to just focus in on blob. If I can go ahead and double-click. It'll provide my year, so if I had several years here, they would all be listed. Again, I can drill down into zero-one, this being our month.
The days, we have data available. I'm going to take January 6th and, then, we can drill down even further into the hour itself. So we'll go ahead and take 17:00. And here is our log file. I can go ahead and download this and you can see I've previously done that, down at the bottom All this will do is open up a Notepad file with this log information in it. You can use your favorite program to analyze these log files. Next, let's go ahead and take a look at our metrics.
Metrics are located within the tables so we'll start off with that capacity blob. Again, this tells us how much data we're consuming, how many containers and objects we have. And, you'll see here, that we have our timestamp, how much we're using, our capacity, the container count. In my case, there is only one container. And our object count, how many objects do we have within that container. And, finally, let's go ahead and take a look at the metrics. For an example, we're going to take the blob. This is hourly.
You will notice that we can pull information on a variety of metrics that we have collected. From the partition key, our timestamp, the row key, who or what requested access, the total requests, the total billable requests. This is something you may want to start tracking if you're just learning Azure Storage, just to keep an idea of how much the cost may be. Your total ingress and your total egress. Again, remembering that Microsoft does not charge you to move data into Azure but they do charge you to move data out.
Again, plan your storage use accordingly. Your availability, everything here has been a 100%. I'm going to scroll over a little bit. You'll notice here we have our latency. And, as we continue to scroll over, we have additional metrics. Throttling is here, timeout errors. And the list is quite large. But just to give you an idea of exactly what you can track. Remember monitoring and logging will help you prevent and evaluate the health of your storage accounts.
- Implementing storage blobs and Azure files
- Managing access
- Configuring diagnostics, monitoring, and analytics
- Enabling and viewing logs
- Implementing Azure SQL databases
- Implementing recovery services
- Creating an Azure Backup vault
- Configuring the Azure Backup agent
- Backing up and restoring files
- Backing up an Azure virtual machine