Jun 17 2021
- last edited on
Apr 08 2022
Azure Resource Graph (ARG) is a service in Azure that is designed to extend Azure Resource Management by providing efficient and performant resource exploration, with the ability to query at scale across a given set of subscriptions so that you can effectively govern your environment. By querying ARG, you can query resources with complex filtering, iteratively explore resources based on governance requirements, and assess the impact of applying policies in a vast cloud environment.
With Grafana 8.0, we are happy to announce that Azure monitor data source now supports querying Azure resource graph.
There is no extra configuration needed to use this service. Queries are written in the Kusto Query Language and Azure Resource Graph query results are formatted as table data. If your credentials give you access to multiple subscriptions, then you can select them before entering the query.
Aug 02 2021 12:53 AM
@MJSharmathanks for this new functionality! Do you know if it is possible to use the access to ARG to populate variables in grafana?
My use case is to have a query list all our application insight resources in a drop down which then drives other queries to application insights.
Sep 27 2021 01:10 PM
@MattB5 Yes, it is possible to use ARG to populate variables in Grafana. You can use the ResourceNames template variable shown in Azure Monitor template variables | Grafana Labs to get started.
For your use case, you would start with ARG to select the relevant App Insight resource, but run the subsequent query on the Azure Monitor Log Analytics workspace where your App Insights data is stored using the variable to filter on results matching the selected resource.
Note that App Insights has been deprecated as a data source in Grafana and you should run new queries against Azure Monitor Metrics and Logs.
Application Insights deprecation | Grafana Labs
Lastly, you can learn to migrate existing classic App Insights resources to workspace-based Application Insights resources here:
Migrate an Azure Monitor Application Insights classic resource to a workspace-based resource - Azure...
Dec 08 2021 04:47 PM
Feb 07 2022 01:28 AM
In the screenshot, you have a query to the resource table of ARG. How would you query the same (or another table) in ARG in a variable?
I'm trying to query securityresources, but cannot find any documentation of how to properly query ARG in a variable. ResoruceNames() does not help because I have multiple subscriptions to query.
Feb 18 2022 11:18 AM
@ale_phat I'm not sure I completely understand your question but you can use the Subscriptions() query to return a list of subscriptions and you can use custom variable that contains the values of all tables that you want to choose from to run your query.