Skip to content

Querying ARG with LokqlDx

Neil MacMullen edited this page Sep 21, 2025 · 1 revision

Lokqldx can issue KQL queries to Azure Resource Group API and render the results locally using the .arg command

.set tenantid 1eb4...
.set subscrition ....

.arg $tenantid:$subscription
Resources
| where type =~ "Microsoft.Storage/storageAccounts"
| extend s=tostring(sku)
| summarize count() by location
| project location,count_,Key=location
| render barchart with (title "Accounts by region")

command format

.arg requires a subscription id and accepts an optional tenant id

Rendering

Although the ARG API does not accept the render operator, LokqlDx will process the render clause, remove it from the query before submission, and then use the visualization state to render locally.

KQL compatibility

Note that ARG only supports a subset of KQL syntax

Clone this wiki locally