Microsoft Azure

How to use the Azure Resource Graph Explorer to inventory resources in MS Azure

Hello, in this article we will see how to inventory our resources using the Resource Graph Explorer service. This is very useful for us when we have multiple resources and we want in a simple way by using queries (KQL) to visualize the resources of one or several subscriptions.

Prerequisite:

A Microsoft Azure subscription.

Disclaimer: Due to the constant updating of Cloud Computing technologies some steps may be different when reading the article, I will make the effort to keep it updated, but there could be some differences between what is shown below and the Azure console at the time of the implementation.

Working with Resource Graph Explorer

  1. Enter https://portal.azure.com, once inside go to all All Services and type Resource Graph Explorer
  2. There we see an interface with tables on the left side and in the middle a window in which we can type queries.
  3. Type count and then click on Run query, this will indicate the amount of resources we have.
  4. If we want to have a resource count by resource type we can use the query: summarize Count = count () by type
  5. If we want to sort it down and take the first 10 we can use the following query: summarize Count = count() by type|order by Count desc|take 10
  6. In case we do not want to see them as a table but in a graphical way by clicking on Charts and selecting bar chart we can see it as a bar chart
  7. Once we have the bar chart we will pin it to a portal panel by clicking on Pin to dashboard
  8. If we go to Dashboard now we will see the bar chart.
  9. At the top we have the option to apply filters, for example if we want to filter by region we can click on Add filter, then select Location and choose East US

Leave a Reply

avatar
  Subscribe  
Notify of