Today I want to show you how easy you can get all the information you need to help you troubleshoot Azure runbook errors.
I have set up very simple powershell script to run under the Azure automation account which collects data about the VMs. There are million great articles about the Azure Automation Accounts, so I am not going into the details how to setup it.
I am not going into the details what the powershell script is doing as I want to show you how you can get most of it when something goes wrong.
Let’s click Start the runbook and check what is the output of it.
In the screenshot above it shows the the runbook job completed successfully. However it generated bunch of the error messages. If I go and click on the Errors it gives me all the errors were produced during the execution. After clicking on it, I get the general info (usually we do, unfortunately not always. Today I was not able to collect any info from the Stream blade and Azure was giving just an empty screen).
In this case scenario Azure Resource Explorer comes in play. I am pretty sure that most of us are already using it, but for those who does not, it will be the best thing happened today. To access Azure Resource Explorer, simply go to https://resources.azure.com
The usage of it is very simple. Choose the directory you are working on, subscription and navigate on the left hand side as follows: Subscription – resourceGroups – <resource group name> – providers – Microsoft.Automation – automationAccounts – <automation account name> – jobs – <job id> – streams
And going through the stream IDs you will get all detailed information that you can see what exactly happened during runbook execution.
About the Author:
Martynas is an Azure MVP, Blogger and speaker. He is an active guy who is lives by the motto – never stop learning and always accept new challenges!