I’ve been working on Microsoft Azure Services for the last 3-4 years. I always like to work on the cloud platform provided by Microsoft. Microsoft always comes up with new services and features with their products. I have observed one thing with Azure that creating any resources or creating the design is no big deal. There are lots of technical material and forums provided by Microsoft. The most challenging thing with Azure is troubleshooting any issue till you reach the actual root cause. In practice, many times, what happens that if we are getting an exception/error message, we check for other way or replace the solution. We just try to get out of that issue. We never try to go to the root of that issue and find out the actual root cause.
In Azure, while deploying any resources, if we get an exception or error, there are different ways to find out the details of the error. Today, I will show you how to get/extract the exact detail of error/exception from Azure portal.
We all know that with ARM, every resource on Azure is connected with any Resource Group. I hope you are aware of Resource Group. If you want to know more about resource group, check the article Resource Group.
Here, I will explain how you can get more details on exception/error from Azure deployment which will help to dig out the actual issue and find the root cause. In our day to day work, we use PowerShell runbooks to manage (Create , Update , Delete) all Azure resources. In my automation account, I have created multiple runbooks for different actions and resources.
Two ways are there to check the logs and details of exception (if any).Job
Every time you execute any runbook, it gets mapped with Jobs, which shows all details such as what are inputs parameters, Output, Logs, Errors, and warnings.
Deployment details provide you all the information about exception and errors. You can troubleshoot your actual issue with this deployment log. Below, you will find the process of how to get this deployment log/details.
Loginto the Azure Portal.
- Open Resource Group which you are using to perform the related action. Ex. If you are creating
newVM in Azure, you need to open the particular resource group in which you are creating this new VM.
- When you will open Resource Group >> Overview tab, you will see Deployment value like “Succeeded” or “Failed” and count as well. Click on that link.
- Here, you will find all deployment details with Date, Time duration, status, and all its related events as well. To get more details on each event, click on “Related events” in the last column.
- Check Deployment Name. This will give you the exact action which you were looking for. For example – if you have performed multiple actions like created Resource Group, Storage, Web Application and Virtual Machine and now you want to search logs for your last action ‘Create VM’, this Deployment name will show the action with the name like ‘DeployWindowsVMNamexxxxx’.
- Once you find out the exact action, click on “Related events” in the last row.
- Here, you can check the activity logs in details. Also, you can apply filters on these logs. You can filter on Subscription, Resource Group, Resource, Resource Type, Date-Time, Event category, Event severity
- Error Details
You will get complete error details once you click on the below link.
- Click on (Error Details) link. You will get error type and details on how can you solve it.
- For exact details, click on the Deployment Name link. These details include status and all events as well.
- Click on “Events” link.
- You will see all the events of your deployments, Level and its status.
Here, the important point is to check CORRELATION IDs. This value can be helpful when working with technical support to troubleshoot a deployment. You can share this ID with technical support team.
Activity logs contain several categories of data. Like Administrative, Service health, Alert, Auto scale, Recommendation, Security etc. You can query and view Azure Logs, can create an Alert on Activity Log events, and can use it in PowerBI using PowerBI content back.
Here, you can filter like error, alerts etc.
So, that’s about Azure Logs and Deployment details. If you have any questions or queries, let me know.