Troubleshooting Azure Runbooks with Azure Resource Explorer

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.

GetVMDetails

GetVMDetails

Let’s click Start the runbook and check what is the output of it.

 

Jobs

Jobs

 

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).

Errors

Errors

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

<job id> you can see on the Job blade, Essentials section. In my case it is 0d47bb6e-xxxx

And going through the stream IDs you will get all detailed information that you can see what exactly happened during runbook execution.

Happy troubleshooting!

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!

Reference:

Valkunas, M. (2018). Troubleshooting Azure Runbooks with Azure Resource Explorer. Available at: https://magicmarty.eu/2018/02/troubleshooting-azure-runbooks-with-azure-resource-explorer/ [Accesed 25 January 2019]
Share this on...

Rate this Post:

Share: