An Introduction to Azure Resource Graph

This post has been republished via RSS; it originally appeared at: ITOps Talk Blog articles.

Do you need the ability to quickly explore the resources across all your subscription and see what you are running? If you're answer is yes, then Azure Resource Graph is the service for you.

 

The Azure Resource graph, based off the Kusto query language, is a service in Azure that gives you the ability to query your environment at scale and quickly. It allows you to query and parse the properties of your resources returned by resource providers without needing to make individual calls to each resource provider. It can also allow you to view the last 14 days of change history made to the resource to see what properties changed and when(preview). You can query using Azure CLI, Azure PowerShell, and Azure SDK for .NET. And using the Azure Resource Graph Explorer.

 

Azure Resource Graph was designed to help customers manage large-scale environments but you don't have to have a large environment to see its value. Prior to Azure Resource Graph, the process to query your resources was limited to 2000 items and involved complex scripts, which at times would cause bottlenecks and timeouts. Now with Azure resource graph all resources are returned during a query. The power of the service can also be seen running the Portal's search bar and in the new "All Resources" (in Preview), all of which is now being powered by the Azure Resource graph.

 

The older view of "All Resources" with the screenshot below is limited to 2000 items.

 

graphc.png

 

 

The previous screenshot can only show 2000. The search should return over 9000 resources. Here’s what the same search looks like in the preview with the new "All Resources".

 

graphF.png

 

While the black background of Azure cli and PowerShell is quick it can be intimating to others that are not so comfortable with command line ,this is where the power of Azure Resource Graph really shines. Azure Resource Graph Explorer brings a more graphical user interface to querying your resources. It not only gives you a UI but you can even display the query results with a chart and pin those results to your dashboard. Now that's something you can't do via the command line and can be very useful from a reporting aspect.

 

An example of a query that you normally couldn't do easily is query any running disks in across your subscriptions that are not attached. See below screenshot.

 

graphB.gif

 

 

 

graphE.JPG

To get started with Azure Resource graph you can check out the starter queries here. Dig into it and explore across your subscriptions. You may find stuff you didn’t know existed.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.