dt-obs-azure
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAzure Cloud Infrastructure
Azure云基础设施
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.
使用Dynatrace Smartscape和DQL监控并分析Azure资源。查询Azure服务、审计安全状况、管理组织层级,并针对Azure基础设施进行容量规划。
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 |
| VNet topology, subnets, NSGs, public IPs, VPN, peering | Load |
| Azure SQL, Cosmos DB, PostgreSQL, Redis investigation | Load |
| Functions, App Service, AKS infrastructure, Container Apps | Load |
| Azure LB, Application Gateway, Front Door, API Management | Load |
| WAF rule analysis, false-positive investigation | Load |
| Event Hubs, Service Bus, Event Grid | Load |
| Storage Accounts, Blob, File, Queue, Table | Load |
| Unattached resources, tag compliance, lifecycle | Load |
| Cost savings, unused resources, SKU analysis | Load |
| Capacity headroom, VMSS scaling, quotas | Load |
| Security audit, encryption, public access, Key Vault | Load |
| NSG rule analysis (0.0.0.0/0, open ports) | Load |
| Storage account encryption/public access audit | Load |
| Cost allocation, chargeback, ownership | Load |
| Determine orchestration context (AKS, VMSS, standalone) | Load |
当用户需要在Dynatrace中操作Azure资源时使用此技能。根据任务类型加载参考文件:
| 任务 | 需加载的文件 |
|---|---|
| 资源清单与拓扑查询 | (无需额外文件——使用下方核心模式) |
| 查询Azure指标时间序列(CPU、延迟、吞吐量) | 加载 |
| VNet拓扑、子网、NSG、公网IP、VPN、对等连接 | 加载 |
| Azure SQL、Cosmos DB、PostgreSQL、Redis排查 | 加载 |
| Functions、App Service、AKS基础设施、Container Apps | 加载 |
| Azure LB、Application Gateway、Front Door、API Management | 加载 |
| WAF规则分析、误报排查 | 加载 |
| Event Hubs、Service Bus、Event Grid | 加载 |
| 存储账户、Blob、File、Queue、Table | 加载 |
| 未关联资源、标签合规性、生命周期 | 加载 |
| 成本节约、未使用资源、SKU分析 | 加载 |
| 容量余量、VMSS伸缩、配额 | 加载 |
| 安全审计、加密、公网访问、Key Vault | 加载 |
| NSG规则分析(0.0.0.0/0、开放端口) | 加载 |
| 存储账户加密/公网访问审计 | 加载 |
| 成本分配、费用回溯、归属权 | 加载 |
| 确定编排上下文(AKS、VMSS、独立资源) | 加载 |
Core Concepts
核心概念
Entity Types
实体类型
Azure resources use the prefix and can be queried using the function. All Azure entities are automatically discovered and modeled in Dynatrace Smartscape. Entity type names are derived from the ARM resource provider path: becomes . Sub-resources append with underscores: becomes .
AZURE_*smartscapeNodes/Microsoft.Compute/virtualMachinesAZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES/Microsoft.Sql/servers/databasesAZURE_MICROSOFT_SQL_SERVERS_DATABASESCompute: , , , , ,
Networking: , , , , , , , , ,
Database: , , , ,
Storage: , , , ,
Kubernetes/Containers: , , , , ,
App Service: , ,
Messaging: , , , , ,
Security/Identity: ,
Monitoring: ,
API Management:
AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESAZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETSAZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS_VIRTUALMACHINESAZURE_MICROSOFT_COMPUTE_DISKSAZURE_MICROSOFT_COMPUTE_SSHPUBLICKEYSAZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES_EXTENSIONSAZURE_MICROSOFT_NETWORK_VIRTUALNETWORKSAZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS_SUBNETSAZURE_MICROSOFT_NETWORK_NETWORKSECURITYGROUPSAZURE_MICROSOFT_NETWORK_PUBLICIPADDRESSESAZURE_MICROSOFT_NETWORK_NETWORKINTERFACESAZURE_MICROSOFT_NETWORK_LOADBALANCERSAZURE_MICROSOFT_NETWORK_APPLICATIONGATEWAYSAZURE_MICROSOFT_NETWORK_VIRTUALNETWORKGATEWAYSAZURE_MICROSOFT_NETWORK_CONNECTIONSAZURE_MICROSOFT_NETWORK_EXPRESSROUTECIRCUITSAZURE_MICROSOFT_SQL_SERVERSAZURE_MICROSOFT_SQL_SERVERS_DATABASESAZURE_MICROSOFT_CACHE_REDISAZURE_MICROSOFT_CACHE_REDISENTERPRISEAZURE_MICROSOFT_DOCUMENTDB_DATABASEACCOUNTSAZURE_MICROSOFT_STORAGE_STORAGEACCOUNTSAZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_BLOBSERVICES_CONTAINERSAZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_FILESERVICES_SHARESAZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_QUEUESERVICES_QUEUESAZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_TABLESERVICES_TABLESAZURE_MICROSOFT_CONTAINERSERVICE_MANAGEDCLUSTERSAZURE_MICROSOFT_CONTAINERSERVICE_MANAGEDCLUSTERS_AGENTPOOLSAZURE_MICROSOFT_CONTAINERREGISTRY_REGISTRIESAZURE_MICROSOFT_APP_CONTAINERAPPSAZURE_MICROSOFT_APP_MANAGEDENVIRONMENTSAZURE_MICROSOFT_APP_JOBSAZURE_MICROSOFT_WEB_SITESAZURE_MICROSOFT_WEB_SERVERFARMSAZURE_MICROSOFT_WEB_SITES_FUNCTIONSAZURE_MICROSOFT_EVENTHUB_NAMESPACESAZURE_MICROSOFT_EVENTHUB_NAMESPACES_EVENTHUBSAZURE_MICROSOFT_SERVICEBUS_NAMESPACESAZURE_MICROSOFT_SERVICEBUS_NAMESPACES_QUEUESAZURE_MICROSOFT_SERVICEBUS_NAMESPACES_TOPICSAZURE_MICROSOFT_SERVICEBUS_NAMESPACES_TOPICS_SUBSCRIPTIONSAZURE_MICROSOFT_KEYVAULT_VAULTSAZURE_MICROSOFT_MANAGEDIDENTITY_USERASSIGNEDIDENTITIESAZURE_MICROSOFT_OPERATIONALINSIGHTS_WORKSPACESAZURE_MICROSOFT_INSIGHTS_COMPONENTSAZURE_MICROSOFT_APIMANAGEMENT_SERVICEAzure资源使用前缀,可通过函数查询。所有Azure实体都会被自动发现并在Dynatrace Smartscape中建模。实体类型名称源自ARM资源提供程序路径:会变为。子资源以下划线追加:会变为。
AZURE_*smartscapeNodes/Microsoft.Compute/virtualMachinesAZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES/Microsoft.Sql/servers/databasesAZURE_MICROSOFT_SQL_SERVERS_DATABASES计算类: , , , , ,
网络类: , , , , , , , , ,
数据库类: , , , ,
存储类: , , , ,
Kubernetes/容器类: , , , , ,
App Service类: , ,
消息类: , , , , ,
安全/身份类: ,
监控类: ,
API管理类:
AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESAZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETSAZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS_VIRTUALMACHINESAZURE_MICROSOFT_COMPUTE_DISKSAZURE_MICROSOFT_COMPUTE_SSHPUBLICKEYSAZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES_EXTENSIONSAZURE_MICROSOFT_NETWORK_VIRTUALNETWORKSAZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS_SUBNETSAZURE_MICROSOFT_NETWORK_NETWORKSECURITYGROUPSAZURE_MICROSOFT_NETWORK_PUBLICIPADDRESSESAZURE_MICROSOFT_NETWORK_NETWORKINTERFACESAZURE_MICROSOFT_NETWORK_LOADBALANCERSAZURE_MICROSOFT_NETWORK_APPLICATIONGATEWAYSAZURE_MICROSOFT_NETWORK_VIRTUALNETWORKGATEWAYSAZURE_MICROSOFT_NETWORK_CONNECTIONSAZURE_MICROSOFT_NETWORK_EXPRESSROUTECIRCUITSAZURE_MICROSOFT_SQL_SERVERSAZURE_MICROSOFT_SQL_SERVERS_DATABASESAZURE_MICROSOFT_CACHE_REDISAZURE_MICROSOFT_CACHE_REDISENTERPRISEAZURE_MICROSOFT_DOCUMENTDB_DATABASEACCOUNTSAZURE_MICROSOFT_STORAGE_STORAGEACCOUNTSAZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_BLOBSERVICES_CONTAINERSAZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_FILESERVICES_SHARESAZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_QUEUESERVICES_QUEUESAZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_TABLESERVICES_TABLESAZURE_MICROSOFT_CONTAINERSERVICE_MANAGEDCLUSTERSAZURE_MICROSOFT_CONTAINERSERVICE_MANAGEDCLUSTERS_AGENTPOOLSAZURE_MICROSOFT_CONTAINERREGISTRY_REGISTRIESAZURE_MICROSOFT_APP_CONTAINERAPPSAZURE_MICROSOFT_APP_MANAGEDENVIRONMENTSAZURE_MICROSOFT_APP_JOBSAZURE_MICROSOFT_WEB_SITESAZURE_MICROSOFT_WEB_SERVERFARMSAZURE_MICROSOFT_WEB_SITES_FUNCTIONSAZURE_MICROSOFT_EVENTHUB_NAMESPACESAZURE_MICROSOFT_EVENTHUB_NAMESPACES_EVENTHUBSAZURE_MICROSOFT_SERVICEBUS_NAMESPACESAZURE_MICROSOFT_SERVICEBUS_NAMESPACES_QUEUESAZURE_MICROSOFT_SERVICEBUS_NAMESPACES_TOPICSAZURE_MICROSOFT_SERVICEBUS_NAMESPACES_TOPICS_SUBSCRIPTIONSAZURE_MICROSOFT_KEYVAULT_VAULTSAZURE_MICROSOFT_MANAGEDIDENTITY_USERASSIGNEDIDENTITIESAZURE_MICROSOFT_OPERATIONALINSIGHTS_WORKSPACESAZURE_MICROSOFT_INSIGHTS_COMPONENTSAZURE_MICROSOFT_APIMANAGEMENT_SERVICEAzure Organizational Hierarchy
Azure组织层级
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:
dql
filter azure.subscription == "08b9810e-..."dql
filter azure.resource.group == "my-rg"dql
filter azure.location == "eastus"Combine these filters for precise scoping:
dql
smartscapeNodes "AZURE_*"
| filter azure.subscription == "<SUBSCRIPTION_ID>"
and azure.resource.group == "<RESOURCE_GROUP>"
and azure.location == "<REGION>"
| summarize count = count(), by: {type}
| sort count descTo see the organizational breakdown across your environment:
dql
smartscapeNodes "AZURE_*"
| summarize resource_count = count(), by: {azure.subscription, azure.resource.group}
| sort resource_count descAzure采用三级层级结构组织资源:租户 > 订阅 > 资源组。每个资源仅属于一个订阅中的一个资源组。可使用以下字段限定查询范围:
dql
filter azure.subscription == "08b9810e-..."dql
filter azure.resource.group == "my-rg"dql
filter azure.location == "eastus"组合这些过滤器以实现精准范围限定:
dql
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如需查看环境中的组织细分情况:
dql
smartscapeNodes "AZURE_*"
| summarize resource_count = count(), by: {azure.subscription, azure.resource.group}
| sort resource_count descCommon Azure Fields
通用Azure字段
All Azure entities include:
- — Azure subscription GUID
azure.subscription - — Resource group name
azure.resource.group - — Azure region (e.g.,
azure.location,eastus)polandcentral - — ARM resource type (e.g.,
azure.resourceType)microsoft.compute/virtualmachines - — Provisioning state (e.g.,
azure.provisioning_state)Succeeded - — Full ARM resource JSON (see Configuration Parsing)
azure.object - — Always
cloud.providerazure - — Resource tags (use
tags)tags[`key`]
Some entity types also have:
- — Full ARM resource ID (VMs and some others)
azure.resourceId - — Resource name (VMs and some others)
azure.resourceName - — Availability zone list (VMs)
azure.availabilityZones
所有Azure实体均包含以下字段:
- — Azure订阅GUID
azure.subscription - — 资源组名称
azure.resource.group - — Azure区域(例如
azure.location、eastus)polandcentral - — ARM资源类型(例如
azure.resourceType)microsoft.compute/virtualmachines - — 部署状态(例如
azure.provisioning_state)Succeeded - — 完整的ARM资源JSON(参见配置解析)
azure.object - — 始终为
cloud.providerazure - — 资源标签(使用
tags)tags[`key`]
部分实体类型还包含:
- — 完整的ARM资源ID(VM及部分其他资源)
azure.resourceId - — 资源名称(VM及部分其他资源)
azure.resourceName - — 可用区列表(VM)
azure.availabilityZones
Relationship Types
关系类型
Azure entity relationships can be traversed using . The field is not populated for Azure entities, so you must use as the relationship name in all traversal commands.
traversedt.traverse.relationship"*"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 to carry fields through multi-hop traversals
fieldsKeep:{field1, field2} - After a single-hop traverse, use to get the source entity ID, then
dt.traverse.history[0][id]to resolve the source entity name:lookupdql| fieldsAdd sourceId = dt.traverse.history[0][id] | lookup [smartscapeNodes "SOURCE_TYPE" | fields name, id], sourceField: sourceId, lookupField: id, prefix: "src." - After multi-hop traversals, works for fields carried via
dt.traverse.history[-N]fieldsKeep
可使用遍历Azure实体关系。Azure实体的字段未填充,因此在所有遍历命令中必须使用作为关系名称。
traversedt.traverse.relationship"*"关键遍历对:
- VM → 磁盘:
traverse "*", "AZURE_MICROSOFT_COMPUTE_DISKS" - VM → 网卡:
traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKINTERFACES" - VM → VMSS:
traverse "*", "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS" - VM → 可用区:
traverse "*", "AZURE_MICROSOFT_RESOURCES_LOCATIONS_AVAILABILITYZONES" - VM ← 扩展:
traverse "*", "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES_EXTENSIONS", direction:backward - VMSS → AKS集群:
traverse "*", "AZURE_MICROSOFT_CONTAINERSERVICE_MANAGEDCLUSTERS" - VMSS → 子网:
traverse "*", "AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS_SUBNETS" - VMSS → NSG:
traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKSECURITYGROUPS" - VMSS → LB后端池:
traverse "*", "AZURE_MICROSOFT_NETWORK_LOADBALANCERS_BACKENDADDRESSPOOLS" - 子网 → VNet:
traverse "*", "AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS" - 子网 → NSG:
traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKSECURITYGROUPS" - 子网 ← VMSS:
traverse "*", "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS", direction:backward - NSG ← 网卡:
traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKINTERFACES", direction:backward - NSG ← 子网:
traverse "*", "AZURE_MICROSOFT_NETWORK_VIRTUALNETWORKS_SUBNETS", direction:backward - LB → 后端池:
traverse "*", "AZURE_MICROSOFT_NETWORK_LOADBALANCERS_BACKENDADDRESSPOOLS" - LB → 前端IP:
traverse "*", "AZURE_MICROSOFT_NETWORK_LOADBALANCERS_FRONTENDIPCONFIGURATIONS" - LB → LB规则:
traverse "*", "AZURE_MICROSOFT_NETWORK_LOADBALANCERS_LOADBALANCINGRULES" - SQL Server ← SQL数据库:
traverse "*", "AZURE_MICROSOFT_SQL_SERVERS_DATABASES", direction:backward - 存储账户 ← Blob容器:
traverse "*", "AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_BLOBSERVICES_CONTAINERS", direction:backward - 存储账户 ← 文件共享:
traverse "*", "AZURE_MICROSOFT_STORAGE_STORAGEACCOUNTS_FILESERVICES_SHARES", direction:backward - AKS ← VMSS:
traverse "*", "AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINESCALESETS", direction:backward - AKS ← 代理池:
traverse "*", "AZURE_MICROSOFT_CONTAINERSERVICE_MANAGEDCLUSTERS_AGENTPOOLS", direction:backward - AKS ← NSG:
traverse "*", "AZURE_MICROSOFT_NETWORK_NETWORKSECURITYGROUPS", direction:backward - AKS ← 公网IP:
traverse "*", "AZURE_MICROSOFT_NETWORK_PUBLICIPADDRESSES", direction:backward - AKS → 公网IP:
traverse "*", "AZURE_MICROSOFT_NETWORK_PUBLICIPADDRESSES" - 网站 → App Service计划:
traverse "*", "AZURE_MICROSOFT_WEB_SERVERFARMS" - 网站 ← Functions:
traverse "*", "AZURE_MICROSOFT_WEB_SITES_FUNCTIONS", direction:backward - Container App → 托管环境:
traverse "*", "AZURE_MICROSOFT_APP_MANAGEDENVIRONMENTS" - EventHub命名空间 ← Event Hubs:
traverse "*", "AZURE_MICROSOFT_EVENTHUB_NAMESPACES_EVENTHUBS", direction:backward - ServiceBus命名空间 ← 队列:
traverse "*", "AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_QUEUES", direction:backward - ServiceBus命名空间 ← 主题:
traverse "*", "AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_TOPICS", direction:backward - ServiceBus主题 ← 订阅:
traverse "*", "AZURE_MICROSOFT_SERVICEBUS_NAMESPACES_TOPICS_SUBSCRIPTIONS", direction:backward - 使用在多跳遍历中保留字段
fieldsKeep:{field1, field2} - 单跳遍历后,使用获取源实体ID,再使用
dt.traverse.history[0][id]解析源实体名称:lookupdql| fieldsAdd sourceId = dt.traverse.history[0][id] | lookup [smartscapeNodes "SOURCE_TYPE" | fields name, id], sourceField: sourceId, lookupField: id, prefix: "src." - 多跳遍历后,可用于访问通过
dt.traverse.history[-N]保留的字段fieldsKeep
Azure Metric Naming Convention
Azure指标命名规范
Dynatrace ingests Azure Monitor metrics and exposes them using this naming pattern:
cloud.azure.<provider_namespace>.<resource_type>.<MetricName>The uses underscores within the namespace (e.g., ) and is lowercase (e.g., ). Hierarchy levels are dot-separated: . is the Azure Monitor metric name.
<provider_namespace>microsoft_compute<resource_type>virtualmachinesmicrosoft_sql.servers.databases<MetricName>Examples:
| Azure Monitor metric | Dynatrace metric key |
|---|---|
VM | |
SQL DB | |
Storage | |
Event Hub | |
Service Bus | |
App Service | |
Load Balancer | |
AKS | |
Cosmos DB | |
Redis | |
App Gateway | |
To query a metric:
dql
timeseries cpu = avg(cloud.azure.microsoft_compute.virtualmachines.PercentageCPU),
by: {dt.smartscape_source.id},
from: now()-1h
| limit 10Important: 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.
Dynatrace会摄取Azure Monitor指标,并采用以下命名模式暴露这些指标:
cloud.azure.<provider_namespace>.<resource_type>.<MetricName><provider_namespace>microsoft_compute<resource_type>virtualmachinesmicrosoft_sql.servers.databases<MetricName>示例:
| Azure Monitor指标 | Dynatrace指标键 |
|---|---|
VM | |
SQL DB | |
Storage | |
Event Hub | |
Service Bus | |
App Service | |
负载均衡器 | |
AKS | |
Cosmos DB | |
Redis | |
Application Gateway | |
查询指标示例:
dql
timeseries cpu = avg(cloud.azure.microsoft_compute.virtualmachines.PercentageCPU),
by: {dt.smartscape_source.id},
from: now()-1h
| limit 10重要提示: 在输出中切勿将这些称为“Azure Monitor警报”或“Azure Monitor指标”。Dynatrace通过其Azure集成原生监控Azure资源——这些是从Azure摄取的Dynatrace指标。
Configuration Parsing with azure.object
使用azure.object进行配置解析
The field contains the full ARM resource JSON. Parse it with the alias:
azure.objectazjsondql
parse azure.object, "JSON:azjson"The JSON is wrapped in a key:
configurationjson
{
"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.osTypeproperties.extended.instanceView.powerState.displayStatus - VMSS: (VM size),
sku.name(instance count),sku.capacitytags.aks-managed-poolName - NSG: (custom rules array),
properties.securityRules[],properties.securityRules[].properties.direction,properties.securityRules[].properties.accessproperties.securityRules[].properties.sourceAddressPrefix - Storage Account: (e.g., StorageV2),
kind,sku.name,properties.accessTier,properties.supportsHttpsTrafficOnly,properties.allowBlobPublicAccessproperties.encryption.keySource - SQL Server: ,
properties.fullyQualifiedDomainName,properties.publicNetworkAccessproperties.minimalTlsVersion - SQL Database: (tier),
sku.name(DTU/vCore),sku.capacity,properties.statusproperties.zoneRedundant - AKS: ,
properties.kubernetesVersion,properties.powerState.code,properties.networkProfile.networkPluginproperties.enableRBAC - Web Site: (e.g.,
kind),functionapp,linux,properties.state,properties.defaultHostNameproperties.siteConfig.linuxFxVersion - Container App: ,
properties.runningStatus,properties.template.containers[].image,properties.template.scale.minReplicasproperties.template.scale.maxReplicas - Event Hub Namespace: ,
sku.name,properties.kafkaEnabledproperties.zoneRedundant - Service Bus Namespace: (Basic/Standard/Premium),
sku.name,properties.zoneRedundant,properties.minimumTlsVersion,properties.publicNetworkAccess,properties.disableLocalAuthproperties.status - Service Bus Queue: ,
properties.maxSizeInMegabytes,properties.enablePartitioning,properties.deadLetteringOnMessageExpiration,properties.maxDeliveryCount,properties.lockDuration,properties.requiresDuplicateDetectionproperties.status - Key Vault: ,
properties.enableRbacAuthorization,properties.enableSoftDeleteproperties.publicNetworkAccess - Redis: ,
properties.sku.name,properties.hostName,properties.redisVersionproperties.enableNonSslPort - Cosmos DB: (e.g., GlobalDocumentDB),
kind,properties.EnabledApiTypesproperties.consistencyPolicy.defaultConsistencyLevel - Load Balancer: ,
sku.nametags.aks-managed-cluster-name - App Gateway: ,
properties.sku.name,properties.sku.tier,properties.operationalState,properties.webApplicationFirewallConfiguration.enabled(Detection/Prevention),properties.webApplicationFirewallConfiguration.firewallMode,properties.webApplicationFirewallConfiguration.ruleSetType,properties.webApplicationFirewallConfiguration.ruleSetVersion,properties.webApplicationFirewallConfiguration.disabledRuleGroups[],properties.webApplicationFirewallConfiguration.exclusions[]properties.firewallPolicy.id
azure.objectazjsondql
parse azure.object, "JSON:azjson"JSON被包裹在键中:
configurationjson
{
"configuration": {
"id": "<ARM resource ID>",
"name": "<resource name>",
"type": "<ARM resource type>",
"location": "<region>",
"sku": { ... },
"properties": { ... },
"zones": [...]
},
"tags": { ... }
}访问模式:
- 属性:
azjson[configuration][properties][field] - SKU:
azjson[configuration][sku][name] - 类型:
azjson[configuration][kind] - 可用区:
azjson[configuration][zones]
各服务常见配置字段:
- VM: ,
properties.hardwareProfile.vmSize,properties.storageProfile.imageReference.offer,properties.storageProfile.osDisk.osTypeproperties.extended.instanceView.powerState.displayStatus - VMSS: (VM规格),
sku.name(实例数量),sku.capacitytags.aks-managed-poolName - NSG: (自定义规则数组),
properties.securityRules[],properties.securityRules[].properties.direction,properties.securityRules[].properties.accessproperties.securityRules[].properties.sourceAddressPrefix - 存储账户: (例如StorageV2),
kind,sku.name,properties.accessTier,properties.supportsHttpsTrafficOnly,properties.allowBlobPublicAccessproperties.encryption.keySource - SQL Server: ,
properties.fullyQualifiedDomainName,properties.publicNetworkAccessproperties.minimalTlsVersion - SQL数据库: (层级),
sku.name(DTU/vCore),sku.capacity,properties.statusproperties.zoneRedundant - AKS: ,
properties.kubernetesVersion,properties.powerState.code,properties.networkProfile.networkPluginproperties.enableRBAC - 网站: (例如
kind),functionapp,linux,properties.state,properties.defaultHostNameproperties.siteConfig.linuxFxVersion - Container App: ,
properties.runningStatus,properties.template.containers[].image,properties.template.scale.minReplicasproperties.template.scale.maxReplicas - Event Hub命名空间: ,
sku.name,properties.kafkaEnabledproperties.zoneRedundant - ServiceBus命名空间: (Basic/Standard/Premium),
sku.name,properties.zoneRedundant,properties.minimumTlsVersion,properties.publicNetworkAccess,properties.disableLocalAuthproperties.status - ServiceBus队列: ,
properties.maxSizeInMegabytes,properties.enablePartitioning,properties.deadLetteringOnMessageExpiration,properties.maxDeliveryCount,properties.lockDuration,properties.requiresDuplicateDetectionproperties.status - Key Vault: ,
properties.enableRbacAuthorization,properties.enableSoftDeleteproperties.publicNetworkAccess - Redis: ,
properties.sku.name,properties.hostName,properties.redisVersionproperties.enableNonSslPort - Cosmos DB: (例如GlobalDocumentDB),
kind,properties.EnabledApiTypesproperties.consistencyPolicy.defaultConsistencyLevel - 负载均衡器: ,
sku.nametags.aks-managed-cluster-name - Application Gateway: ,
properties.sku.name,properties.sku.tier,properties.operationalState,properties.webApplicationFirewallConfiguration.enabled(Detection/Prevention),properties.webApplicationFirewallConfiguration.firewallMode,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.
所有Azure查询均基于四种核心模式。掌握这些模式并根据实体类型进行调整。
Pattern 1: Resource Discovery
模式1:资源发现
List resources by type, filter by subscription/resource group/region/tags, summarize counts:
dql
smartscapeNodes "AZURE_*"
| filter azure.subscription == "<SUBSCRIPTION_ID>" and azure.location == "<REGION>"
| summarize count = count(), by: {type}
| sort count descTo list a specific type, replace with the entity type (e.g., ). Add to select specific columns. Use for tag-based filtering.
"AZURE_*""AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES"| fields name, azure.subscription, azure.resource.group, azure.location, ...tags[`TagName`]按类型列出资源,按订阅/资源组/区域/标签过滤,汇总数量:
dql
smartscapeNodes "AZURE_*"
| filter azure.subscription == "<SUBSCRIPTION_ID>" and azure.location == "<REGION>"
| summarize count = count(), by: {type}
| sort count desc如需列出特定类型,将替换为实体类型(例如)。添加选择特定列。使用进行基于标签的过滤。
"AZURE_*""AZURE_MICROSOFT_COMPUTE_VIRTUALMACHINES"| fields name, azure.subscription, azure.resource.group, azure.location, ...tags[`TagName`]Pattern 2: Configuration Parsing
模式2:配置解析
Parse JSON for detailed configuration fields:
azure.objectdql
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}解析 JSON以获取详细配置字段:
azure.objectdql
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
模式3:关系遍历
Follow relationships between resources. Use for the relationship name since Azure does not populate :
"*"dt.traverse.relationshipdql
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
追踪资源间的关系。由于Azure未填充,请使用作为关系名称:
dt.traverse.relationship"*"dql
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]与AWS遍历的关键区别:
- 始终使用作为关系名称(Azure的关系类型名称为空)
"*" - Azure关系主要遵循父-子层级:子资源反向链接到父资源
- AKS是主要的关系枢纽,VMSS、NSG、LB、公网IP、代理池和托管标识均反向链接到AKS集群实体
Pattern 4: Tag-Based Ownership
模式4:基于标签的归属权
Group resources by any tag for ownership/chargeback:
dql
smartscapeNodes "AZURE_*"
| filter isNotNull(tags[`<TAG_NAME>`])
| summarize resource_count = count(), by: {tags[`<TAG_NAME>`], type}
| sort resource_count descCommon Azure tags: , , , , . Replace with a specific type to scope to one service.
tags[`ACE:CREATED-BY`]tags[`dt_owner_email`]tags[`dt_owner_team`]tags[`project`]tags[`managed-by`]"AZURE_*"Find untagged resources:
| filter arraySize(tags) == 0按任意标签对资源分组以实现归属权/费用回溯:
dql
smartscapeNodes "AZURE_*"
| filter isNotNull(tags[`<TAG_NAME>`])
| summarize resource_count = count(), by: {tags[`<TAG_NAME>`], type}
| sort resource_count desc常见Azure标签:, , , , 。将替换为特定类型以限定到单一服务。
tags[`ACE:CREATED-BY`]tags[`dt_owner_email`]tags[`dt_owner_team`]tags[`project`]tags[`managed-by`]"AZURE_*"查找未标记资源:
| filter arraySize(tags) == 0Reference 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 |
当核心模式需要针对特定服务调整时,加载参考文件获取详细查询语句。
| 参考文件 | 加载时机 | 核心内容 |
|---|---|---|
| vnet-networking-security.md | VNet拓扑、子网、NSG、公网IP、VPN、对等连接 | VNet/子网映射、NSG影响范围、公网IP检测 |
| database-monitoring.md | Azure SQL、Cosmos DB、Redis缓存 | 服务层级分布、区域冗余、公网访问检查 |
| serverless-containers.md | Functions、App Service、AKS基础设施、Container Apps | 运行时分布、App Service计划映射、AKS节点池 |
| load-balancing-api.md | 负载均衡器、Application Gateway、API Management | LB后端池遍历、Application Gateway路由、APIM配置 |
| messaging-integration.md | Event Hubs、Service Bus、Event Grid | 命名空间清单、Kafka启用状态、吞吐量单元分析 |
| storage-monitoring.md | 存储账户、Blob、File、Queue、Table | SKU分布、访问层级、加密审计、公网访问 |
| resource-management.md | 资源审计、标签合规性、生命周期 | 未关联磁盘、标签覆盖率、部署状态分析 |
| cost-optimization.md | 成本节约、未使用资源、规格调整 | VM SKU分析、未关联磁盘、已解除分配的VM |
| capacity-planning.md | 容量分析、伸缩、利用率 | VMSS余量、子网IP数量、AKS节点池规格 |
| security-compliance.md | 安全审计、加密、公网访问、Key Vault | NSG规则分析、TLS版本审计、公网端点检测、加密检查 |
| resource-ownership.md | 成本分配、费用回溯、归属权 | 基于标签的分组、订阅/资源组汇总 |
| workload-detection.md | 确定编排上下文和解析路径 | AKS节点、VMSS成员、独立VM检测以进行影响范围分析 |
| metrics-performance.md | 查询特定资源的指标时间序列 | VM、SQL、存储、Event Hub、LB、App Service、AKS、Cosmos DB、Redis、Application Gateway的DQL时间序列模式 |
Best Practices
最佳实践
Query Optimization
查询优化
- Filter early by subscription, resource group, and region
- Use specific entity types (avoid wildcards when possible)
"AZURE_*" - Limit results with for exploration
| limit N - Use checks before accessing nested fields
isNotNull()
- 尽早按订阅、资源组和区域过滤
- 使用特定实体类型(尽可能避免通配符)
"AZURE_*" - 使用限制探索性查询的结果数量
| limit N - 在访问嵌套字段前使用检查
isNotNull()
Configuration Parsing
配置解析
- Always parse with JSON parser:
azure.objectparse azure.object, "JSON:azjson" - Use consistent field naming:
fieldsAdd configField = azjson[configuration][properties][field] - Access SKU via (not inside
azjson[configuration][sku][name])properties - Check for null values after parsing — not all entity types have the same properties structure
- Use for complex nested objects
toString()
- 始终使用JSON解析器解析:
azure.objectparse azure.object, "JSON:azjson" - 使用一致的字段命名:
fieldsAdd configField = azjson[configuration][properties][field] - 通过访问SKU(而非
azjson[configuration][sku][name]内部)properties - 解析后检查空值——并非所有实体类型都具有相同的属性结构
- 对复杂嵌套对象使用
toString()
Organizational Hierarchy
组织层级
- Always scope queries by in multi-subscription environments
azure.subscription - Use to narrow to a team or application boundary
azure.resource.group - Combine for region-specific analysis
azure.location - Use for organizational breakdowns
summarize ... by: {azure.subscription, azure.resource.group}
- 在多订阅环境中,始终按限定查询范围
azure.subscription - 使用缩小到团队或应用边界
azure.resource.group - 结合进行区域特定分析
azure.location - 使用获取组织细分情况
summarize ... by: {azure.subscription, azure.resource.group}
Tagging Strategy
标签策略
- Use for filtering (backtick-quoted key names)
tags[`key`] - Check for untagged resources
arraySize(tags) - Track tag coverage with summarize operations
- Common ownership tags: ,
dt_owner_email,dt_owner_teamACE:CREATED-BY
- 使用进行过滤(键名使用反引号括起)
tags[`key`] - 检查以查找未标记资源
arraySize(tags) - 使用汇总操作跟踪标签覆盖率
- 常见归属权标签:、
dt_owner_email、dt_owner_teamACE:CREATED-BY
Limitations and Notes
限制与注意事项
Smartscape Limitations
Smartscape限制
- Azure object configuration requires parsing with
parse azure.object, "JSON:azjson" - Azure metrics are available as Dynatrace metrics using the naming convention (see Azure Metric Naming Convention)
cloud.azure.* - Resource discovery depends on Azure integration configuration in Dynatrace
- Tag synchronization may have slight delays
- Azure对象配置需要使用进行解析
parse azure.object, "JSON:azjson" - Azure指标以命名规范作为Dynatrace指标提供(参见Azure指标命名规范)
cloud.azure.* - 资源发现依赖于Dynatrace中的Azure集成配置
- 标签同步可能存在轻微延迟
Relationship Traversal
关系遍历
- Azure relationship type names are empty — always use as the relationship name in
"*"commandstraverse - Use for reverse relationships (e.g., sub-resources to parent)
direction:backward - Use to maintain important fields through traversal
fieldsKeep - Access traversal history with for single-hop source entity ID; use
dt.traverse.history[0][id]to resolve source entity namelookup - For multi-hop traversals, accesses fields carried via
dt.traverse.history[-N]fieldsKeep - Azure relationships primarily follow parent-child hierarchy patterns
- AKS is a major relationship hub — expect many backward relationships converging on AKS cluster entities
- Azure关系类型名称为空——在命令中始终使用
traverse作为关系名称"*" - 对反向关系使用(例如子资源到父资源)
direction:backward - 使用在遍历过程中保留重要字段
fieldsKeep - 使用获取单跳源实体ID;使用
dt.traverse.history[0][id]解析源实体名称lookup - 对于多跳遍历,可访问通过
dt.traverse.history[-N]保留的字段fieldsKeep - Azure关系主要遵循父-子层级模式
- AKS是主要的关系枢纽——预计会有许多反向关系汇聚到AKS集群实体
AKS Coverage
AKS覆盖范围
- 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 skill
dt-obs-kubernetes
- 此技能仅涵盖AKS基础设施层实体(集群、代理池、VMSS、网络)
- 对于Kubernetes工作负载层可观测性(Pod、Deployment、Service、Namespace),请使用技能
dt-obs-kubernetes
General Tips
通用提示
- Use for human-readable resource names
getNodeName() - Handle null values gracefully with and
isNotNull()isNull() - Combine subscription, resource group, and region filters for large environments
- Use for unique resource counts
countDistinct() - The field is lowercase ARM format (e.g.,
azure.resourceType) — useful for filtering but not for entity type matchingmicrosoft.compute/virtualmachines
- 使用获取易读的资源名称
getNodeName() - 使用和
isNotNull()优雅处理空值isNull() - 在大型环境中组合订阅、资源组和区域过滤器
- 使用获取唯一资源数量
countDistinct() - 字段为小写ARM格式(例如
azure.resourceType)——适用于过滤但不适用于实体类型匹配microsoft.compute/virtualmachines