Azure Cloud Infrastructure
Monitor and analyze Azure resources using Dynatrace Smartscape and DQL. Query Azure services, audit security, manage organizational hierarchy, and plan capacity across your Azure infrastructure.
When to Use This Skill
Use this skill when the user needs to work with Azure resources in Dynatrace. Load the reference file for the task type:
| Task |
File to load |
| Inventory and topology queries |
(no additional file — use core patterns below) |
| Query Azure metric timeseries (CPU, latency, throughput) |
Load references/metrics-performance.md |
| VNet topology, subnets, NSGs, public IPs, VPN, peering |
Load references/vnet-networking-security.md |
| Azure SQL, Cosmos DB, PostgreSQL, Redis investigation |
Load references/database-monitoring.md |
| Functions, App Service, AKS infrastructure, Container Apps |
Load references/serverless-containers.md |
| Azure LB, Application Gateway, Front Door, API Management |
Load references/load-balancing-api.md |
| WAF rule analysis, false-positive investigation |
Load references/load-balancing-api.md |
| Event Hubs, Service Bus, Event Grid |
Load references/messaging-integration.md |
| Storage Accounts, Blob, File, Queue, Table |
Load references/storage-monitoring.md |
| Unattached resources, tag compliance, lifecycle |
Load references/resource-management.md |
| Cost savings, unused resources, SKU analysis |
Load references/cost-optimization.md |
| Capacity headroom, VMSS scaling, quotas |
Load references/capacity-planning.md |
| Security audit, encryption, public access, Key Vault |
Load references/security-compliance.md |
| NSG rule analysis (0.0.0.0/0, open ports) |
Load references/security-compliance.md |
| Storage account encryption/public access audit |
Load references/security-compliance.md |
| Cost allocation, chargeback, ownership |
Load references/resource-ownership.md |
| Determine orchestration context (AKS, VMSS, standalone) |
Load references/workload-detection.md |
Core Concepts
Entity Types
Azure resources use the AZURE_* prefix and can be queried using the smartscapeNodes function. All Azure entities are automatically discovered and modeled in Dynatrace Smartscape. Entity type names are derived from the ARM resource provider path: /Microsoft.Compute/virtualMachines becomes AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES. Sub-resources append with underscores: /Microsoft.Sql/servers/databases becomes AZURE_MICROSOFT_SQL_SERVERS_DATABASES.
Compute: AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES, AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS, AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS_VIRTUALMACHINES, AZURE_MICROSOFT_COMPUTE_DISKS, AZURE_MICROSOFT_COMPUTE_SSHPUBLICKEYS, AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES_EXTENSIONS
Networking: AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS, AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS_SUBNETS, AZURE_MICROSOFT_NETWORK_NETWORKSECURITYGROUPS, AZURE_MICROSOFT_NETWORK_PUBLICIPADDRESSES, AZURE_MICROSOFT_NETWORK_NETWORKINTERFACES, AZURE_MICROSOFT_NETWORK_LOADBALANCERS, AZURE_MICROSOFT_NETWORK_APPLICATIONGATEWAYS, AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKGATEWAYS, AZURE_MICROSOFT_NETWORK_CONNECTIONS, AZURE_MICROSOFT_NETWORK_EXPRESSROUTECIRCUITS
Database: AZURE_MICROSOFT_SQL_SERVERS, AZURE_MICROSOFT_SQL_SERVERS_DATABASES, AZURE_MICROSOFT_CACHE_REDIS, AZURE_MICROSOFT_CACHE_REDISENTERPRISE, AZURE_MICROSOFT_DOCUMENTDB_DATABASEACCOUNTS
Storage: AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS, AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_BLOBSERVICES_CONTAINERS, AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_FILESERVICES_SHARES, AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_QUEUESERVICES_QUEUES, AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_TABLESERVICES_TABLES
Kubernetes/Containers: AZURE_MICROSOFT_CONTAINERSERVICE_MANAGEDCLUSTERS, AZURE_MICROSOFT_CONTAINERSERVICE_MANAGEDCLUSTERS_AGENTPOOLS, AZURE_MICROSOFT_CONTAINERREGISTRY_REGISTRIES, AZURE_MICROSOFT_APP_CONTAINERAPPS, AZURE_MICROSOFT_APP_MANAGEDENVIRONMENTS, AZURE_MICROSOFT_APP_JOBS
App Service: AZURE_MICROSOFT_WEB_SITES, AZURE_MICROSOFT_WEB_SERVERFARMS, AZURE_MICROSOFT_WEB_SITES_FUNCTIONS
Messaging: AZURE_MICROSOFT_EVENTHUB_NAMESPACES, AZURE_MICROSOFT_EVENTHUB_NAMESPACES_EVENTHUBS, AZURE_MICROSOFT_SERVICEBUS_NAMESPACES, AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_QUEUES, AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_TOPICS, AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_TOPICS_SUBSCRIPTIONS
Security/Identity: AZURE_MICROSOFT_KEYVAULT_VAULTS, AZURE_MICROSOFT_MANAGEDIDENTITY_USERASSIGNEDIDENTITIES
Monitoring: AZURE_MICROSOFT_OPERATIONALINSIGHTS_WORKSPACES, AZURE_MICROSOFT_INSIGHTS_COMPONENTS
API Management: AZURE_MICROSOFT_APIMANAGEMENT_SERVICE
Azure Organizational Hierarchy
Azure organizes resources in a three-level hierarchy: Tenant > Subscription > Resource Group. Every resource belongs to exactly one resource group within one subscription. Use these fields to scope queries:
filter azure.subscription == "08b9810e-..."
filter azure.resource.group == "my-rg"
filter azure.location == "eastus"
Combine these filters for precise scoping:
smartscapeNodes "AZURE_*"
| filter azure.subscription == "<SUBSCRIPTION_ID>"
and azure.resource.group == "<RESOURCE_GROUP>"
and azure.location == "<REGION>"
| summarize count = count(), by: {type}
| sort count desc
To see the organizational breakdown across your environment:
smartscapeNodes "AZURE_*"
| summarize resource_count = count(), by: {azure.subscription, azure.resource.group}
| sort resource_count desc
Common Azure Fields
All Azure entities include:
azure.subscription — Azure subscription GUID
azure.resource.group — Resource group name
azure.location — Azure region (e.g., eastus, polandcentral)
azure.resourceType — ARM resource type (e.g., microsoft.compute/virtualmachines)
azure.provisioning_state — Provisioning state (e.g., Succeeded)
azure.object — Full ARM resource JSON (see Configuration Parsing)
cloud.provider — Always azure
tags — Resource tags (use tags[`key`])
Some entity types also have:
azure.resourceId — Full ARM resource ID (VMs and some others)
azure.resourceName — Resource name (VMs and some others)
azure.availabilityZones — Availability zone list (VMs)
Relationship Types
Azure entity relationships can be traversed using traverse. The dt.traverse.relationship field is not populated for Azure entities, so you must use "*" as the relationship name in all traversal commands.
Key traversal pairs:
- VM → Disks:
traverse "*", "AZURE_MICROSOFT_COMPUTE_DISKS"
- VM → NICs:
traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKINTERFACES"
- VM → VMSS:
traverse "*", "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS"
- VM → Availability Zones:
traverse "*", "AZURE_MICROSOFT_RESOURCES_LOCATIONS_AVAILABILITYZONES"
- VM ← Extensions:
traverse "*", "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES_EXTENSIONS", direction:backward
- VMSS → AKS Clusters:
traverse "*", "AZURE_MICROSOFT_CONTAINERSERVICE_MANAGEDCLUSTERS"
- VMSS → Subnets:
traverse "*", "AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS_SUBNETS"
- VMSS → NSGs:
traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKSECURITYGROUPS"
- VMSS → LB Backend Pools:
traverse "*", "AZURE_MICROSOFT_NETWORK_LOADBALANCERS_BACKENDADDRESSPOOLS"
- Subnet → VNet:
traverse "*", "AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS"
- Subnet → NSG:
traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKSECURITYGROUPS"
- Subnet ← VMSS:
traverse "*", "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS", direction:backward
- NSG ← NICs:
traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKINTERFACES", direction:backward
- NSG ← Subnets:
traverse "*", "AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS_SUBNETS", direction:backward
- LB → Backend Pools:
traverse "*", "AZURE_MICROSOFT_NETWORK_LOADBALANCERS_BACKENDADDRESSPOOLS"
- LB → Frontend IPs:
traverse "*", "AZURE_MICROSOFT_NETWORK_LOADBALANCERS_FRONTENDIPCONFIGURATIONS"
- LB → LB Rules:
traverse "*", "AZURE_MICROSOFT_NETWORK_LOADBALANCERS_LOADBALANCINGRULES"
- SQL Server ← SQL Databases:
traverse "*", "AZURE_MICROSOFT_SQL_SERVERS_DATABASES", direction:backward
- Storage Account ← Blob Containers:
traverse "*", "AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_BLOBSERVICES_CONTAINERS", direction:backward
- Storage Account ← File Shares:
traverse "*", "AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_FILESERVICES_SHARES", direction:backward
- AKS ← VMSS:
traverse "*", "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS", direction:backward
- AKS ← Agent Pools:
traverse "*", "AZURE_MICROSOFT_CONTAINERSERVICE_MANAGEDCLUSTERS_AGENTPOOLS", direction:backward
- AKS ← NSGs:
traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKSECURITYGROUPS", direction:backward
- AKS ← Public IPs:
traverse "*", "AZURE_MICROSOFT_NETWORK_PUBLICIPADDRESSES", direction:backward
- AKS → Public IPs:
traverse "*", "AZURE_MICROSOFT_NETWORK_PUBLICIPADDRESSES"
- Web Site → App Service Plan:
traverse "*", "AZURE_MICROSOFT_WEB_SERVERFARMS"
- Web Site ← Functions:
traverse "*", "AZURE_MICROSOFT_WEB_SITES_FUNCTIONS", direction:backward
- Container App → Managed Environment:
traverse "*", "AZURE_MICROSOFT_APP_MANAGEDENVIRONMENTS"
- EventHub Namespace ← Event Hubs:
traverse "*", "AZURE_MICROSOFT_EVENTHUB_NAMESPACES_EVENTHUBS", direction:backward
- ServiceBus Namespace ← Queues:
traverse "*", "AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_QUEUES", direction:backward
- ServiceBus Namespace ← Topics:
traverse "*", "AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_TOPICS", direction:backward
- ServiceBus Topic ← Subscriptions:
traverse "*", "AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_TOPICS_SUBSCRIPTIONS", direction:backward
- Use
fieldsKeep:{field1, field2} to carry fields through multi-hop traversals
- After a single-hop traverse, use
dt.traverse.history[0][id] to get the source entity ID, then lookup to resolve the source entity name:| fieldsAdd sourceId = dt.traverse.history[0][id]
| lookup [smartscapeNodes "SOURCE_TYPE" | fields name, id], sourceField: sourceId, lookupField: id, prefix: "src."
- After multi-hop traversals,
dt.traverse.history[-N] works for fields carried via fieldsKeep
Azure Metric Naming Convention
Dynatrace ingests Azure Monitor metrics and exposes them using this naming pattern:
cloud.azure.<provider_namespace>.<resource_type>.<MetricName>
The <provider_namespace> uses underscores within the namespace (e.g., microsoft_compute) and <resource_type> is lowercase (e.g., virtualmachines). Hierarchy levels are dot-separated: microsoft_sql.servers.databases. <MetricName> is the Azure Monitor metric name.
Examples:
| Azure Monitor metric |
Dynatrace metric key |
VM Percentage CPU |
cloud.azure.microsoft_compute.virtualmachines.PercentageCPU |
SQL DB cpu_percent |
cloud.azure.microsoft_sql.servers.databases.cpu_percent |
Storage Ingress |
cloud.azure.microsoft_storage.storageaccounts.Ingress |
Event Hub IncomingMessages |
cloud.azure.microsoft_eventhub.namespaces.IncomingMessages |
Service Bus IncomingMessages |
cloud.azure.microsoft_servicebus.namespaces.IncomingMessages |
App Service HttpResponseTime |
cloud.azure.microsoft_web.sites.HttpResponseTime |
Load Balancer ByteCount |
cloud.azure.microsoft_network.loadbalancers.ByteCount |
AKS node_cpu_usage_percentage |
cloud.azure.microsoft_containerservice.managedclusters.node_cpu_usage_percentage |
Cosmos DB TotalRequestUnits |
cloud.azure.microsoft_documentdb.databaseaccounts.TotalRequestUnits |
Redis serverLoad |
cloud.azure.microsoft_cache.redis.serverLoad |
App Gateway TotalRequests |
cloud.azure.microsoft_network.applicationgateways.TotalRequests |
To query a metric:
timeseries cpu = avg(cloud.azure.microsoft_compute.virtualmachines.PercentageCPU),
by: {dt.smartscape_source.id},
from: now()-1h
| limit 10
Important: Never refer to these as "Azure Monitor alerts" or "Azure Monitor metrics" in output. Dynatrace monitors Azure resources natively through its Azure integration — these are Dynatrace metrics ingested from Azure.
Configuration Parsing with azure.object
The azure.object field contains the full ARM resource JSON. Parse it with the azjson alias:
parse azure.object, "JSON:azjson"
The JSON is wrapped in a configuration key:
{
"configuration": {
"id": "<ARM resource ID>",
"name": "<resource name>",
"type": "<ARM resource type>",
"location": "<region>",
"sku": { ... },
"properties": { ... },
"zones": [...]
},
"tags": { ... }
}
Access patterns:
- Properties:
azjson[configuration][properties][field]
- SKU:
azjson[configuration][sku][name]
- Kind:
azjson[configuration][kind]
- Zones:
azjson[configuration][zones]
Common configuration fields by service:
- VM:
properties.hardwareProfile.vmSize, properties.storageProfile.imageReference.offer, properties.storageProfile.osDisk.osType, properties.extended.instanceView.powerState.displayStatus
- VMSS:
sku.name (VM size), sku.capacity (instance count), tags.aks-managed-poolName
- NSG:
properties.securityRules[] (custom rules array), properties.securityRules[].properties.direction, properties.securityRules[].properties.access, properties.securityRules[].properties.sourceAddressPrefix
- Storage Account:
kind (e.g., StorageV2), sku.name, properties.accessTier, properties.supportsHttpsTrafficOnly, properties.allowBlobPublicAccess, properties.encryption.keySource
- SQL Server:
properties.fullyQualifiedDomainName, properties.publicNetworkAccess, properties.minimalTlsVersion
- SQL Database:
sku.name (tier), sku.capacity (DTU/vCore), properties.status, properties.zoneRedundant
- AKS:
properties.kubernetesVersion, properties.powerState.code, properties.networkProfile.networkPlugin, properties.enableRBAC
- Web Site:
kind (e.g., functionapp,linux), properties.state, properties.defaultHostName, properties.siteConfig.linuxFxVersion
- Container App:
properties.runningStatus, properties.template.containers[].image, properties.template.scale.minReplicas, properties.template.scale.maxReplicas
- Event Hub Namespace:
sku.name, properties.kafkaEnabled, properties.zoneRedundant
- Service Bus Namespace:
sku.name (Basic/Standard/Premium), properties.zoneRedundant, properties.minimumTlsVersion, properties.publicNetworkAccess, properties.disableLocalAuth, properties.status
- Service Bus Queue:
properties.maxSizeInMegabytes, properties.enablePartitioning, properties.deadLetteringOnMessageExpiration, properties.maxDeliveryCount, properties.lockDuration, properties.requiresDuplicateDetection, properties.status
- Key Vault:
properties.enableRbacAuthorization, properties.enableSoftDelete, properties.publicNetworkAccess
- Redis:
properties.sku.name, properties.hostName, properties.redisVersion, properties.enableNonSslPort
- Cosmos DB:
kind (e.g., GlobalDocumentDB), properties.EnabledApiTypes, properties.consistencyPolicy.defaultConsistencyLevel
- Load Balancer:
sku.name, tags.aks-managed-cluster-name
- App Gateway:
properties.sku.name, properties.sku.tier, properties.operationalState, properties.webApplicationFirewallConfiguration.enabled, properties.webApplicationFirewallConfiguration.firewallMode (Detection/Prevention), properties.webApplicationFirewallConfiguration.ruleSetType, properties.webApplicationFirewallConfiguration.ruleSetVersion, properties.webApplicationFirewallConfiguration.disabledRuleGroups[], properties.webApplicationFirewallConfiguration.exclusions[], properties.firewallPolicy.id
Query Patterns
All Azure queries build on four core patterns. Master these and adapt them to any entity type.
Pattern 1: Resource Discovery
List resources by type, filter by subscription/resource group/region/tags, summarize counts:
smartscapeNodes "AZURE_*"
| filter azure.subscription == "<SUBSCRIPTION_ID>" and azure.location == "<REGION>"
| summarize count = count(), by: {type}
| sort count desc
To list a specific type, replace "AZURE_*" with the entity type (e.g., "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES"). Add | fields name, azure.subscription, azure.resource.group, azure.location, ... to select specific columns. Use tags[`TagName`] for tag-based filtering.
Pattern 2: Configuration Parsing
Parse azure.object JSON for detailed configuration fields:
smartscapeNodes "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES"
| parse azure.object, "JSON:azjson"
| fieldsAdd vmSize = azjson[configuration][properties][hardwareProfile][vmSize],
osType = azjson[configuration][properties][storageProfile][osDisk][osType]
| summarize vm_count = count(), by: {vmSize, osType, azure.location}
Pattern 3: Relationship Traversal
Follow relationships between resources. Use "*" for the relationship name since Azure does not populate dt.traverse.relationship:
smartscapeNodes "AZURE_MICROSOFT_NETWORK_LOADBALANCERS"
| parse azure.object, "JSON:azjson"
| fieldsAdd lbSku = azjson[configuration][sku][name]
| traverse "*", "AZURE_MICROSOFT_NETWORK_LOADBALANCERS_BACKENDADDRESSPOOLS", fieldsKeep:{lbSku, name, id}
| fieldsAdd backendPoolName = name
| traverse "*", "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS", direction:backward, fieldsKeep:{backendPoolName, id}
| fieldsAdd loadBalancerName = dt.traverse.history[-2][name],
loadBalancerId = dt.traverse.history[-2][id],
backendPoolId = dt.traverse.history[-1][id]
Key differences from AWS traversals:
- Always use
"*" as the relationship name (relationship type names are empty for Azure)
- Azure relationships primarily follow a parent-child hierarchy: sub-resources link backward to parent resources
- AKS is a major relationship hub with backward links from VMSS, NSGs, LBs, Public IPs, Agent Pools, and Managed Identities
Pattern 4: Tag-Based Ownership
Group resources by any tag for ownership/chargeback:
smartscapeNodes "AZURE_*"
| filter isNotNull(tags[`<TAG_NAME>`])
| summarize resource_count = count(), by: {tags[`<TAG_NAME>`], type}
| sort resource_count desc
Common Azure tags: tags[`ACE:CREATED-BY`], tags[`dt_owner_email`], tags[`dt_owner_team`], tags[`project`], tags[`managed-by`]. Replace "AZURE_*" with a specific type to scope to one service.
Find untagged resources: | filter arraySize(tags) == 0
Reference Guide
Load reference files for detailed queries when the core patterns above need service-specific adaptation.
| Reference |
When to load |
Key content |
| vnet-networking-security.md |
VNet topology, subnets, NSGs, public IPs, VPN, peering |
VNet/subnet mapping, NSG blast radius, public IP detection |
| database-monitoring.md |
Azure SQL, Cosmos DB, Redis Cache |
Service tier distribution, zone redundancy, public access checks |
| serverless-containers.md |
Functions, App Service, AKS infra, Container Apps |
Runtime distribution, App Service Plan mapping, AKS node pools |
| load-balancing-api.md |
Load Balancers, Application Gateways, API Management |
LB backend pool traversal, App Gateway routing, APIM config |
| messaging-integration.md |
Event Hubs, Service Bus, Event Grid |
Namespace inventory, Kafka enablement, throughput unit analysis |
| storage-monitoring.md |
Storage Accounts, Blob, File, Queue, Table |
SKU distribution, access tier, encryption audit, public access |
| resource-management.md |
Resource audits, tag compliance, lifecycle |
Unattached disks, tag coverage, provisioning state analysis |
| cost-optimization.md |
Cost savings, unused resources, sizing |
VM SKU analysis, unattached disks, deallocated VMs |
| capacity-planning.md |
Capacity analysis, scaling, utilization |
VMSS headroom, subnet IP counts, AKS node pool sizing |
| security-compliance.md |
Security audits, encryption, public access, Key Vault |
NSG rule analysis, TLS version audit, public endpoint detection, encryption checks |
| resource-ownership.md |
Chargeback, ownership, cost allocation |
Tag-based grouping, subscription/resource-group summaries |
| workload-detection.md |
Determine orchestration context and resolution path |
AKS node, VMSS member, standalone VM detection for blast radius analysis |
| metrics-performance.md |
Query metric timeseries for a specific resource |
DQL timeseries patterns for VM, SQL, Storage, Event Hub, LB, App Service, AKS, Cosmos DB, Redis, App Gateway |
Best Practices
Query Optimization
- Filter early by subscription, resource group, and region
- Use specific entity types (avoid
"AZURE_*" wildcards when possible)
- Limit results with
| limit N for exploration
- Use
isNotNull() checks before accessing nested fields
Configuration Parsing
- Always parse
azure.object with JSON parser: parse azure.object, "JSON:azjson"
- Use consistent field naming:
fieldsAdd configField = azjson[configuration][properties][field]
- Access SKU via
azjson[configuration][sku][name] (not inside properties)
- Check for null values after parsing — not all entity types have the same properties structure
- Use
toString() for complex nested objects
Organizational Hierarchy
- Always scope queries by
azure.subscription in multi-subscription environments
- Use
azure.resource.group to narrow to a team or application boundary
- Combine
azure.location for region-specific analysis
- Use
summarize ... by: {azure.subscription, azure.resource.group} for organizational breakdowns
Tagging Strategy
- Use
tags[`key`] for filtering (backtick-quoted key names)
- Check
arraySize(tags) for untagged resources
- Track tag coverage with summarize operations
- Common ownership tags:
dt_owner_email, dt_owner_team, ACE:CREATED-BY
Limitations and Notes
Smartscape Limitations
- Azure object configuration requires parsing with
parse azure.object, "JSON:azjson"
- Azure metrics are available as Dynatrace metrics using the
cloud.azure.* naming convention (see Azure Metric Naming Convention)
- Resource discovery depends on Azure integration configuration in Dynatrace
- Tag synchronization may have slight delays
Relationship Traversal
- Azure relationship type names are empty — always use
"*" as the relationship name in traverse commands
- Use
direction:backward for reverse relationships (e.g., sub-resources to parent)
- Use
fieldsKeep to maintain important fields through traversal
- Access traversal history with
dt.traverse.history[0][id] for single-hop source entity ID; use lookup to resolve source entity name
- For multi-hop traversals,
dt.traverse.history[-N] accesses fields carried via fieldsKeep
- Azure relationships primarily follow parent-child hierarchy patterns
- AKS is a major relationship hub — expect many backward relationships converging on AKS cluster entities
AKS Coverage
- This skill covers AKS infrastructure-layer entities only (clusters, agent pools, VMSS, networking)
- For Kubernetes workload-layer observability (pods, deployments, services, namespaces), defer to the
dt-obs-kubernetes skill
General Tips
- Use
getNodeName() for human-readable resource names
- Handle null values gracefully with
isNotNull() and isNull()
- Combine subscription, resource group, and region filters for large environments
- Use
countDistinct() for unique resource counts
- The
azure.resourceType field is lowercase ARM format (e.g., microsoft.compute/virtualmachines) — useful for filtering but not for entity type matching
1---2name: dt-obs-azure3description: Azure cloud resources including VMs, VMSS, SQL Database, Storage, AKS, App Service, Functions, VNet networking, load balancers, Event Hubs, Container Apps, and Key Vault. Monitor Azure infrastructure, analyze resource usage, audit security posture, and manage organizational hierarchy across subscriptions and resource groups.4license: Apache-2.05---67# Azure Cloud Infrastructure89Monitor and analyze Azure resources using Dynatrace Smartscape and DQL. Query Azure services, audit security, manage organizational hierarchy, and plan capacity across your Azure infrastructure.1011## When to Use This Skill1213Use this skill when the user needs to work with Azure resources in Dynatrace. Load the reference file for the task type:1415| Task | File to load |16|---|---|17| Inventory and topology queries | (no additional file — use core patterns below) |18| Query Azure metric timeseries (CPU, latency, throughput) | Load `references/metrics-performance.md` |19| VNet topology, subnets, NSGs, public IPs, VPN, peering | Load `references/vnet-networking-security.md` |20| Azure SQL, Cosmos DB, PostgreSQL, Redis investigation | Load `references/database-monitoring.md` |21| Functions, App Service, AKS infrastructure, Container Apps | Load `references/serverless-containers.md` |22| Azure LB, Application Gateway, Front Door, API Management | Load `references/load-balancing-api.md` |23| WAF rule analysis, false-positive investigation | Load `references/load-balancing-api.md` |24| Event Hubs, Service Bus, Event Grid | Load `references/messaging-integration.md` |25| Storage Accounts, Blob, File, Queue, Table | Load `references/storage-monitoring.md` |26| Unattached resources, tag compliance, lifecycle | Load `references/resource-management.md` |27| Cost savings, unused resources, SKU analysis | Load `references/cost-optimization.md` |28| Capacity headroom, VMSS scaling, quotas | Load `references/capacity-planning.md` |29| Security audit, encryption, public access, Key Vault | Load `references/security-compliance.md` |30| NSG rule analysis (0.0.0.0/0, open ports) | Load `references/security-compliance.md` |31| Storage account encryption/public access audit | Load `references/security-compliance.md` |32| Cost allocation, chargeback, ownership | Load `references/resource-ownership.md` |33| Determine orchestration context (AKS, VMSS, standalone) | Load `references/workload-detection.md` |3435---3637## Core Concepts3839### Entity Types4041Azure resources use the `AZURE_*` prefix and can be queried using the `smartscapeNodes` function. All Azure entities are automatically discovered and modeled in Dynatrace Smartscape. Entity type names are derived from the ARM resource provider path: `/Microsoft.Compute/virtualMachines` becomes `AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES`. Sub-resources append with underscores: `/Microsoft.Sql/servers/databases` becomes `AZURE_MICROSOFT_SQL_SERVERS_DATABASES`.4243**Compute:** `AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES`, `AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS`, `AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS_VIRTUALMACHINES`, `AZURE_MICROSOFT_COMPUTE_DISKS`, `AZURE_MICROSOFT_COMPUTE_SSHPUBLICKEYS`, `AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES_EXTENSIONS`44**Networking:** `AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS`, `AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS_SUBNETS`, `AZURE_MICROSOFT_NETWORK_NETWORKSECURITYGROUPS`, `AZURE_MICROSOFT_NETWORK_PUBLICIPADDRESSES`, `AZURE_MICROSOFT_NETWORK_NETWORKINTERFACES`, `AZURE_MICROSOFT_NETWORK_LOADBALANCERS`, `AZURE_MICROSOFT_NETWORK_APPLICATIONGATEWAYS`, `AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKGATEWAYS`, `AZURE_MICROSOFT_NETWORK_CONNECTIONS`, `AZURE_MICROSOFT_NETWORK_EXPRESSROUTECIRCUITS`45**Database:** `AZURE_MICROSOFT_SQL_SERVERS`, `AZURE_MICROSOFT_SQL_SERVERS_DATABASES`, `AZURE_MICROSOFT_CACHE_REDIS`, `AZURE_MICROSOFT_CACHE_REDISENTERPRISE`, `AZURE_MICROSOFT_DOCUMENTDB_DATABASEACCOUNTS`46**Storage:** `AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS`, `AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_BLOBSERVICES_CONTAINERS`, `AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_FILESERVICES_SHARES`, `AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_QUEUESERVICES_QUEUES`, `AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_TABLESERVICES_TABLES`47**Kubernetes/Containers:** `AZURE_MICROSOFT_CONTAINERSERVICE_MANAGEDCLUSTERS`, `AZURE_MICROSOFT_CONTAINERSERVICE_MANAGEDCLUSTERS_AGENTPOOLS`, `AZURE_MICROSOFT_CONTAINERREGISTRY_REGISTRIES`, `AZURE_MICROSOFT_APP_CONTAINERAPPS`, `AZURE_MICROSOFT_APP_MANAGEDENVIRONMENTS`, `AZURE_MICROSOFT_APP_JOBS`48**App Service:** `AZURE_MICROSOFT_WEB_SITES`, `AZURE_MICROSOFT_WEB_SERVERFARMS`, `AZURE_MICROSOFT_WEB_SITES_FUNCTIONS`49**Messaging:** `AZURE_MICROSOFT_EVENTHUB_NAMESPACES`, `AZURE_MICROSOFT_EVENTHUB_NAMESPACES_EVENTHUBS`, `AZURE_MICROSOFT_SERVICEBUS_NAMESPACES`, `AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_QUEUES`, `AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_TOPICS`, `AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_TOPICS_SUBSCRIPTIONS`50**Security/Identity:** `AZURE_MICROSOFT_KEYVAULT_VAULTS`, `AZURE_MICROSOFT_MANAGEDIDENTITY_USERASSIGNEDIDENTITIES`51**Monitoring:** `AZURE_MICROSOFT_OPERATIONALINSIGHTS_WORKSPACES`, `AZURE_MICROSOFT_INSIGHTS_COMPONENTS`52**API Management:** `AZURE_MICROSOFT_APIMANAGEMENT_SERVICE`5354### Azure Organizational Hierarchy5556Azure organizes resources in a three-level hierarchy: **Tenant > Subscription > Resource Group**. Every resource belongs to exactly one resource group within one subscription. Use these fields to scope queries:5758```dql-snippet59filter azure.subscription == "08b9810e-..."60```6162```dql-snippet63filter azure.resource.group == "my-rg"64```6566```dql-snippet67filter azure.location == "eastus"68```6970Combine these filters for precise scoping:7172```dql-template73smartscapeNodes "AZURE_*"74| filter azure.subscription == "<SUBSCRIPTION_ID>"75 and azure.resource.group == "<RESOURCE_GROUP>"76 and azure.location == "<REGION>"77| summarize count = count(), by: {type}78| sort count desc79```8081To see the organizational breakdown across your environment:8283```dql84smartscapeNodes "AZURE_*"85| summarize resource_count = count(), by: {azure.subscription, azure.resource.group}86| sort resource_count desc87```8889### Common Azure Fields9091All Azure entities include:92- `azure.subscription` — Azure subscription GUID93- `azure.resource.group` — Resource group name94- `azure.location` — Azure region (e.g., `eastus`, `polandcentral`)95- `azure.resourceType` — ARM resource type (e.g., `microsoft.compute/virtualmachines`)96- `azure.provisioning_state` — Provisioning state (e.g., `Succeeded`)97- `azure.object` — Full ARM resource JSON (see [Configuration Parsing](#configuration-parsing-with-azureobject))98- `cloud.provider` — Always `azure`99- `tags` — Resource tags (use `` tags[`key`] ``)100101Some entity types also have:102- `azure.resourceId` — Full ARM resource ID (VMs and some others)103- `azure.resourceName` — Resource name (VMs and some others)104- `azure.availabilityZones` — Availability zone list (VMs)105106### Relationship Types107108Azure entity relationships can be traversed using `traverse`. The `dt.traverse.relationship` field is **not populated** for Azure entities, so you must use `"*"` as the relationship name in all traversal commands.109110Key traversal pairs:111- **VM → Disks:** `traverse "*", "AZURE_MICROSOFT_COMPUTE_DISKS"`112- **VM → NICs:** `traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKINTERFACES"`113- **VM → VMSS:** `traverse "*", "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS"`114- **VM → Availability Zones:** `traverse "*", "AZURE_MICROSOFT_RESOURCES_LOCATIONS_AVAILABILITYZONES"`115- **VM ← Extensions:** `traverse "*", "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES_EXTENSIONS", direction:backward`116- **VMSS → AKS Clusters:** `traverse "*", "AZURE_MICROSOFT_CONTAINERSERVICE_MANAGEDCLUSTERS"`117- **VMSS → Subnets:** `traverse "*", "AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS_SUBNETS"`118- **VMSS → NSGs:** `traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKSECURITYGROUPS"`119- **VMSS → LB Backend Pools:** `traverse "*", "AZURE_MICROSOFT_NETWORK_LOADBALANCERS_BACKENDADDRESSPOOLS"`120- **Subnet → VNet:** `traverse "*", "AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS"`121- **Subnet → NSG:** `traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKSECURITYGROUPS"`122- **Subnet ← VMSS:** `traverse "*", "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS", direction:backward`123- **NSG ← NICs:** `traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKINTERFACES", direction:backward`124- **NSG ← Subnets:** `traverse "*", "AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS_SUBNETS", direction:backward`125- **LB → Backend Pools:** `traverse "*", "AZURE_MICROSOFT_NETWORK_LOADBALANCERS_BACKENDADDRESSPOOLS"`126- **LB → Frontend IPs:** `traverse "*", "AZURE_MICROSOFT_NETWORK_LOADBALANCERS_FRONTENDIPCONFIGURATIONS"`127- **LB → LB Rules:** `traverse "*", "AZURE_MICROSOFT_NETWORK_LOADBALANCERS_LOADBALANCINGRULES"`128- **SQL Server ← SQL Databases:** `traverse "*", "AZURE_MICROSOFT_SQL_SERVERS_DATABASES", direction:backward`129- **Storage Account ← Blob Containers:** `traverse "*", "AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_BLOBSERVICES_CONTAINERS", direction:backward`130- **Storage Account ← File Shares:** `traverse "*", "AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_FILESERVICES_SHARES", direction:backward`131- **AKS ← VMSS:** `traverse "*", "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS", direction:backward`132- **AKS ← Agent Pools:** `traverse "*", "AZURE_MICROSOFT_CONTAINERSERVICE_MANAGEDCLUSTERS_AGENTPOOLS", direction:backward`133- **AKS ← NSGs:** `traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKSECURITYGROUPS", direction:backward`134- **AKS ← Public IPs:** `traverse "*", "AZURE_MICROSOFT_NETWORK_PUBLICIPADDRESSES", direction:backward`135- **AKS → Public IPs:** `traverse "*", "AZURE_MICROSOFT_NETWORK_PUBLICIPADDRESSES"`136- **Web Site → App Service Plan:** `traverse "*", "AZURE_MICROSOFT_WEB_SERVERFARMS"`137- **Web Site ← Functions:** `traverse "*", "AZURE_MICROSOFT_WEB_SITES_FUNCTIONS", direction:backward`138- **Container App → Managed Environment:** `traverse "*", "AZURE_MICROSOFT_APP_MANAGEDENVIRONMENTS"`139- **EventHub Namespace ← Event Hubs:** `traverse "*", "AZURE_MICROSOFT_EVENTHUB_NAMESPACES_EVENTHUBS", direction:backward`140- **ServiceBus Namespace ← Queues:** `traverse "*", "AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_QUEUES", direction:backward`141- **ServiceBus Namespace ← Topics:** `traverse "*", "AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_TOPICS", direction:backward`142- **ServiceBus Topic ← Subscriptions:** `traverse "*", "AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_TOPICS_SUBSCRIPTIONS", direction:backward`143- Use `fieldsKeep:{field1, field2}` to carry fields through multi-hop traversals144- After a **single-hop** traverse, use `dt.traverse.history[0][id]` to get the source entity ID, then `lookup` to resolve the source entity name:145 ```dql-snippet146 | fieldsAdd sourceId = dt.traverse.history[0][id]147 | lookup [smartscapeNodes "SOURCE_TYPE" | fields name, id], sourceField: sourceId, lookupField: id, prefix: "src."148 ```149- After **multi-hop** traversals, `dt.traverse.history[-N]` works for fields carried via `fieldsKeep`150151### Azure Metric Naming Convention152153Dynatrace ingests Azure Monitor metrics and exposes them using this naming pattern:154155```156cloud.azure.<provider_namespace>.<resource_type>.<MetricName>157```158159The `<provider_namespace>` uses underscores within the namespace (e.g., `microsoft_compute`) and `<resource_type>` is lowercase (e.g., `virtualmachines`). Hierarchy levels are dot-separated: `microsoft_sql.servers.databases`. `<MetricName>` is the Azure Monitor metric name.160161**Examples:**162163| Azure Monitor metric | Dynatrace metric key |164|---|---|165| VM `Percentage CPU` | `cloud.azure.microsoft_compute.virtualmachines.PercentageCPU` |166| SQL DB `cpu_percent` | `cloud.azure.microsoft_sql.servers.databases.cpu_percent` |167| Storage `Ingress` | `cloud.azure.microsoft_storage.storageaccounts.Ingress` |168| Event Hub `IncomingMessages` | `cloud.azure.microsoft_eventhub.namespaces.IncomingMessages` |169| Service Bus `IncomingMessages` | `cloud.azure.microsoft_servicebus.namespaces.IncomingMessages` |170| App Service `HttpResponseTime` | `cloud.azure.microsoft_web.sites.HttpResponseTime` |171| Load Balancer `ByteCount` | `cloud.azure.microsoft_network.loadbalancers.ByteCount` |172| AKS `node_cpu_usage_percentage` | `cloud.azure.microsoft_containerservice.managedclusters.node_cpu_usage_percentage` |173| Cosmos DB `TotalRequestUnits` | `cloud.azure.microsoft_documentdb.databaseaccounts.TotalRequestUnits` |174| Redis `serverLoad` | `cloud.azure.microsoft_cache.redis.serverLoad` |175| App Gateway `TotalRequests` | `cloud.azure.microsoft_network.applicationgateways.TotalRequests` |176177To query a metric:178179```dql-template180timeseries cpu = avg(cloud.azure.microsoft_compute.virtualmachines.PercentageCPU),181 by: {dt.smartscape_source.id},182 from: now()-1h183| limit 10184```185186**Important:** Never refer to these as "Azure Monitor alerts" or "Azure Monitor metrics" in output. Dynatrace monitors Azure resources natively through its Azure integration — these are **Dynatrace metrics** ingested from Azure.187188### Configuration Parsing with azure.object189190The `azure.object` field contains the full ARM resource JSON. Parse it with the `azjson` alias:191192```dql-snippet193parse azure.object, "JSON:azjson"194```195196The JSON is wrapped in a `configuration` key:197198```json199{200 "configuration": {201 "id": "<ARM resource ID>",202 "name": "<resource name>",203 "type": "<ARM resource type>",204 "location": "<region>",205 "sku": { ... },206 "properties": { ... },207 "zones": [...]208 },209 "tags": { ... }210}211```212213Access patterns:214- Properties: `azjson[configuration][properties][field]`215- SKU: `azjson[configuration][sku][name]`216- Kind: `azjson[configuration][kind]`217- Zones: `azjson[configuration][zones]`218219Common configuration fields by service:220- **VM:** `properties.hardwareProfile.vmSize`, `properties.storageProfile.imageReference.offer`, `properties.storageProfile.osDisk.osType`, `properties.extended.instanceView.powerState.displayStatus`221- **VMSS:** `sku.name` (VM size), `sku.capacity` (instance count), `tags.aks-managed-poolName`222- **NSG:** `properties.securityRules[]` (custom rules array), `properties.securityRules[].properties.direction`, `properties.securityRules[].properties.access`, `properties.securityRules[].properties.sourceAddressPrefix`223- **Storage Account:** `kind` (e.g., StorageV2), `sku.name`, `properties.accessTier`, `properties.supportsHttpsTrafficOnly`, `properties.allowBlobPublicAccess`, `properties.encryption.keySource`224- **SQL Server:** `properties.fullyQualifiedDomainName`, `properties.publicNetworkAccess`, `properties.minimalTlsVersion`225- **SQL Database:** `sku.name` (tier), `sku.capacity` (DTU/vCore), `properties.status`, `properties.zoneRedundant`226- **AKS:** `properties.kubernetesVersion`, `properties.powerState.code`, `properties.networkProfile.networkPlugin`, `properties.enableRBAC`227- **Web Site:** `kind` (e.g., `functionapp,linux`), `properties.state`, `properties.defaultHostName`, `properties.siteConfig.linuxFxVersion`228- **Container App:** `properties.runningStatus`, `properties.template.containers[].image`, `properties.template.scale.minReplicas`, `properties.template.scale.maxReplicas`229- **Event Hub Namespace:** `sku.name`, `properties.kafkaEnabled`, `properties.zoneRedundant`230- **Service Bus Namespace:** `sku.name` (Basic/Standard/Premium), `properties.zoneRedundant`, `properties.minimumTlsVersion`, `properties.publicNetworkAccess`, `properties.disableLocalAuth`, `properties.status`231- **Service Bus Queue:** `properties.maxSizeInMegabytes`, `properties.enablePartitioning`, `properties.deadLetteringOnMessageExpiration`, `properties.maxDeliveryCount`, `properties.lockDuration`, `properties.requiresDuplicateDetection`, `properties.status`232- **Key Vault:** `properties.enableRbacAuthorization`, `properties.enableSoftDelete`, `properties.publicNetworkAccess`233- **Redis:** `properties.sku.name`, `properties.hostName`, `properties.redisVersion`, `properties.enableNonSslPort`234- **Cosmos DB:** `kind` (e.g., GlobalDocumentDB), `properties.EnabledApiTypes`, `properties.consistencyPolicy.defaultConsistencyLevel`235- **Load Balancer:** `sku.name`, `tags.aks-managed-cluster-name`236- **App Gateway:** `properties.sku.name`, `properties.sku.tier`, `properties.operationalState`, `properties.webApplicationFirewallConfiguration.enabled`, `properties.webApplicationFirewallConfiguration.firewallMode` (Detection/Prevention), `properties.webApplicationFirewallConfiguration.ruleSetType`, `properties.webApplicationFirewallConfiguration.ruleSetVersion`, `properties.webApplicationFirewallConfiguration.disabledRuleGroups[]`, `properties.webApplicationFirewallConfiguration.exclusions[]`, `properties.firewallPolicy.id`237238---239240## Query Patterns241242All Azure queries build on four core patterns. Master these and adapt them to any entity type.243244### Pattern 1: Resource Discovery245246List resources by type, filter by subscription/resource group/region/tags, summarize counts:247248```dql-template249smartscapeNodes "AZURE_*"250| filter azure.subscription == "<SUBSCRIPTION_ID>" and azure.location == "<REGION>"251| summarize count = count(), by: {type}252| sort count desc253```254255To list a specific type, replace `"AZURE_*"` with the entity type (e.g., `"AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES"`). Add `| fields name, azure.subscription, azure.resource.group, azure.location, ...` to select specific columns. Use `` tags[`TagName`] `` for tag-based filtering.256257### Pattern 2: Configuration Parsing258259Parse `azure.object` JSON for detailed configuration fields:260261```dql-template262smartscapeNodes "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES"263| parse azure.object, "JSON:azjson"264| fieldsAdd vmSize = azjson[configuration][properties][hardwareProfile][vmSize],265 osType = azjson[configuration][properties][storageProfile][osDisk][osType]266| summarize vm_count = count(), by: {vmSize, osType, azure.location}267```268269### Pattern 3: Relationship Traversal270271Follow relationships between resources. Use `"*"` for the relationship name since Azure does not populate `dt.traverse.relationship`:272273```dql-template274smartscapeNodes "AZURE_MICROSOFT_NETWORK_LOADBALANCERS"275| parse azure.object, "JSON:azjson"276| fieldsAdd lbSku = azjson[configuration][sku][name]277| traverse "*", "AZURE_MICROSOFT_NETWORK_LOADBALANCERS_BACKENDADDRESSPOOLS", fieldsKeep:{lbSku, name, id}278| fieldsAdd backendPoolName = name279| traverse "*", "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS", direction:backward, fieldsKeep:{backendPoolName, id}280| fieldsAdd loadBalancerName = dt.traverse.history[-2][name],281 loadBalancerId = dt.traverse.history[-2][id],282 backendPoolId = dt.traverse.history[-1][id]283```284285Key differences from AWS traversals:286- Always use `"*"` as the relationship name (relationship type names are empty for Azure)287- Azure relationships primarily follow a parent-child hierarchy: sub-resources link backward to parent resources288- AKS is a major relationship hub with backward links from VMSS, NSGs, LBs, Public IPs, Agent Pools, and Managed Identities289290### Pattern 4: Tag-Based Ownership291292Group resources by any tag for ownership/chargeback:293294```dql-template295smartscapeNodes "AZURE_*"296| filter isNotNull(tags[`<TAG_NAME>`])297| summarize resource_count = count(), by: {tags[`<TAG_NAME>`], type}298| sort resource_count desc299```300301Common Azure tags: `` tags[`ACE:CREATED-BY`] ``, `` tags[`dt_owner_email`] ``, `` tags[`dt_owner_team`] ``, `` tags[`project`] ``, `` tags[`managed-by`] ``. Replace `"AZURE_*"` with a specific type to scope to one service.302303Find untagged resources: `| filter arraySize(tags) == 0`304305---306307## Reference Guide308309Load reference files for detailed queries when the core patterns above need service-specific adaptation.310311| Reference | When to load | Key content |312|---|---|---|313| [vnet-networking-security.md](references/vnet-networking-security.md) | VNet topology, subnets, NSGs, public IPs, VPN, peering | VNet/subnet mapping, NSG blast radius, public IP detection |314| [database-monitoring.md](references/database-monitoring.md) | Azure SQL, Cosmos DB, Redis Cache | Service tier distribution, zone redundancy, public access checks |315| [serverless-containers.md](references/serverless-containers.md) | Functions, App Service, AKS infra, Container Apps | Runtime distribution, App Service Plan mapping, AKS node pools |316| [load-balancing-api.md](references/load-balancing-api.md) | Load Balancers, Application Gateways, API Management | LB backend pool traversal, App Gateway routing, APIM config |317| [messaging-integration.md](references/messaging-integration.md) | Event Hubs, Service Bus, Event Grid | Namespace inventory, Kafka enablement, throughput unit analysis |318| [storage-monitoring.md](references/storage-monitoring.md) | Storage Accounts, Blob, File, Queue, Table | SKU distribution, access tier, encryption audit, public access |319| [resource-management.md](references/resource-management.md) | Resource audits, tag compliance, lifecycle | Unattached disks, tag coverage, provisioning state analysis |320| [cost-optimization.md](references/cost-optimization.md) | Cost savings, unused resources, sizing | VM SKU analysis, unattached disks, deallocated VMs |321| [capacity-planning.md](references/capacity-planning.md) | Capacity analysis, scaling, utilization | VMSS headroom, subnet IP counts, AKS node pool sizing |322| [security-compliance.md](references/security-compliance.md) | Security audits, encryption, public access, Key Vault | NSG rule analysis, TLS version audit, public endpoint detection, encryption checks |323| [resource-ownership.md](references/resource-ownership.md) | Chargeback, ownership, cost allocation | Tag-based grouping, subscription/resource-group summaries |324| [workload-detection.md](references/workload-detection.md) | Determine orchestration context and resolution path | AKS node, VMSS member, standalone VM detection for blast radius analysis |325| [metrics-performance.md](references/metrics-performance.md) | Query metric timeseries for a specific resource | DQL timeseries patterns for VM, SQL, Storage, Event Hub, LB, App Service, AKS, Cosmos DB, Redis, App Gateway |326327---328329## Best Practices330331### Query Optimization3321. Filter early by subscription, resource group, and region3332. Use specific entity types (avoid `"AZURE_*"` wildcards when possible)3343. Limit results with `| limit N` for exploration3354. Use `isNotNull()` checks before accessing nested fields336337### Configuration Parsing3381. Always parse `azure.object` with JSON parser: `parse azure.object, "JSON:azjson"`3392. Use consistent field naming: `fieldsAdd configField = azjson[configuration][properties][field]`3403. Access SKU via `azjson[configuration][sku][name]` (not inside `properties`)3414. Check for null values after parsing — not all entity types have the same properties structure3425. Use `toString()` for complex nested objects343344### Organizational Hierarchy3451. Always scope queries by `azure.subscription` in multi-subscription environments3462. Use `azure.resource.group` to narrow to a team or application boundary3473. Combine `azure.location` for region-specific analysis3484. Use `summarize ... by: {azure.subscription, azure.resource.group}` for organizational breakdowns349350### Tagging Strategy3511. Use `` tags[`key`] `` for filtering (backtick-quoted key names)3522. Check `arraySize(tags)` for untagged resources3533. Track tag coverage with summarize operations3544. Common ownership tags: `dt_owner_email`, `dt_owner_team`, `ACE:CREATED-BY`355356---357358## Limitations and Notes359360### Smartscape Limitations361- Azure object configuration requires parsing with `parse azure.object, "JSON:azjson"`362- Azure metrics are available as Dynatrace metrics using the `cloud.azure.*` naming convention (see [Azure Metric Naming Convention](#azure-metric-naming-convention))363- Resource discovery depends on Azure integration configuration in Dynatrace364- Tag synchronization may have slight delays365366### Relationship Traversal367- **Azure relationship type names are empty** — always use `"*"` as the relationship name in `traverse` commands368- Use `direction:backward` for reverse relationships (e.g., sub-resources to parent)369- Use `fieldsKeep` to maintain important fields through traversal370- Access traversal history with `dt.traverse.history[0][id]` for single-hop source entity ID; use `lookup` to resolve source entity name371- For multi-hop traversals, `dt.traverse.history[-N]` accesses fields carried via `fieldsKeep`372- Azure relationships primarily follow parent-child hierarchy patterns373- AKS is a major relationship hub — expect many backward relationships converging on AKS cluster entities374375### AKS Coverage376- This skill covers AKS **infrastructure-layer** entities only (clusters, agent pools, VMSS, networking)377- For Kubernetes **workload-layer** observability (pods, deployments, services, namespaces), defer to the `dt-obs-kubernetes` skill378379### General Tips380- Use `getNodeName()` for human-readable resource names381- Handle null values gracefully with `isNotNull()` and `isNull()`382- Combine subscription, resource group, and region filters for large environments383- Use `countDistinct()` for unique resource counts384- The `azure.resourceType` field is lowercase ARM format (e.g., `microsoft.compute/virtualmachines`) — useful for filtering but not for entity type matching