Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Diese Seite enthält eine Sammlung von Azure Resource Graph-Beispielabfragen für Azure Advisor.
Beispielabfragen
Mögliche Kosteneinsparungen durch Empfehlungen
Diese Abfrage berechnet die monatlichen Kosteneinsparungen von Azure Advisor Empfehlungen.
advisorresources
| where type =~ "microsoft.advisor/metadata"
| where tostring(properties.language)=="en"
| where tostring(properties.recommendationCategory)=="Cost"
| extend recommendationTypeId=tostring(properties.recommendationTypeId)
| project recommendationTypeId,
metadataSolution=tostring(properties.label)
| join kind=inner (
advisorresources
| where type =~ "microsoft.advisor/recommendations"
| extend recommendationTypeId=tostring(properties.recommendationTypeId)
| extend
resources=tostring(properties.resourceMetadata.resourceId),
savings=todouble(properties.extendedProperties.savingsAmount),
tracked=tobool(properties.tracked),
recommendationSolution=tostring(properties.label),
currency=tostring(properties.extendedProperties.savingsCurrency)
| project recommendationTypeId,resources,savings,tracked,recommendationSolution,currency
) on recommendationTypeId
| extend solution = iff(tracked == true, recommendationSolution, metadataSolution)
| summarize
dcount_resources=dcount(resources),
sum_savings=bin(sum(savings),0.01)
by solution,currency
| where sum_savings > 0
| project solution,dcount_resources,sum_savings,currency
| order by sum_savings desc
az graph query -q "advisorresources | where type =~ "microsoft.advisor/metadata" | where tostring(properties.language)=="en" | where tostring(properties.recommendationCategory)=="Cost" | extend recommendationTypeId=tostring(properties.recommendationTypeId) | project recommendationTypeId, metadataSolution=tostring(properties.label) | join kind=inner ( advisorresources | where type =~ "microsoft.advisor/recommendations" | extend recommendationTypeId=tostring(properties.recommendationTypeId) | extend resources=tostring(properties.resourceMetadata.resourceId), savings=todouble(properties.extendedProperties.savingsAmount), tracked=tobool(properties.tracked), recommendationSolution=tostring(properties.label), currency=tostring(properties.extendedProperties.savingsCurrency) | project recommendationTypeId,resources,savings,tracked,recommendationSolution,currency ) on recommendationTypeId | extend solution = iff(tracked == true, recommendationSolution, metadataSolution) | summarize dcount_resources=dcount(resources), sum_savings=bin(sum(savings),0.01) by solution,currency | where sum_savings > 0 | project solution,dcount_resources,sum_savings,currency | order by sum_savings desc"
Nächste Schritte
- Erfahren Sie mehr über die Abfragesprache.
- Erfahren Sie mehr über das Erkunden von Ressourcen.