Consultas de exemplo do Azure Resource Graph para o Azure Advisor
Esta página é uma coleção de consultas de exemplo do Azure Resource Graph para o Azure Advisor.
Consultas de amostra
Obtenha um resumo das economias de custos do Azure Advisor
Esta consulta resume a economia de custos de cada recomendação do Azure Advisor .
AdvisorResources
| where type == 'microsoft.advisor/recommendations'
| where properties.category == 'Cost'
| extend
resources = tostring(properties.resourceMetadata.resourceId),
savings = todouble(properties.extendedProperties.savingsAmount),
solution = tostring(properties.shortDescription.solution),
currency = tostring(properties.extendedProperties.savingsCurrency)
| summarize
dcount(resources),
bin(sum(savings), 0.01)
by solution, currency
| project solution, dcount_resources, sum_savings, currency
| order by sum_savings desc
az graph query -q "AdvisorResources | where type == 'microsoft.advisor/recommendations' | where properties.category == 'Cost' | extend resources = tostring(properties.resourceMetadata.resourceId), savings = todouble(properties.extendedProperties.savingsAmount), solution = tostring(properties.shortDescription.solution), currency = tostring(properties.extendedProperties.savingsCurrency) | summarize dcount(resources), bin(sum(savings), 0.01) by solution, currency | project solution, dcount_resources, sum_savings, currency | order by sum_savings desc"
Próximos passos
- Saiba mais sobre a linguagem de consulta.
- Saiba mais sobre como explorar recursos.