Share via


Reduce your carbon emissions in Azure

Carbon optimization in Azure works with Azure Advisor to provide optimization recommendations. Azure Advisor identifies idle and underutilized resources and shows the associated carbon and cost savings of implementing the recommendations. Recommendations might include shutdown of idle virtual machines, and rightsizing virtual machines. For more recommendations and information on Azure Advisor, see Reduce service costs using Azure Advisor.

To view carbon optimization recommendations, navigate to the Emissions Reduction page and select the desired subscription and resource groups.

This page shows the total number of available recommendations and potential saving opportunities in terms of cost and carbon. It also shows carbon savings equivalents as calculated by the United States EPA Greenhouse Gas Equivalents calculator.

View recommendations

The list of recommendations in the table shows inefficiently utilized resources that can help cut down on carbon emissions. Each recommendation shows associated carbon savings and potential cost savings that can come from acting on a recommendation.

Act on the recommendation

To act on the recommendation, select the resource name or the text in the Recommendation column. Selecting the recommendation text takes you to the action page for the resource. For example, the resize page, instance count change page, or the resource overview page for delete recommendations.

A screenshot showing the emissions reduction page.

Convert emissions savings into equivalents

The Greenhouse Gas Equivalencies calculator allows you to convert emissions data to the equivalent amount of carbon dioxide (CO2) emitted by using that amount. The calculator helps you translate abstract measurements into concrete terms you can understand, such as the annual emissions from trees, households, or trash bags. This calculator might be useful in communicating your greenhouse gas reduction strategy, reduction targets, or other initiatives aimed at reducing greenhouse gas emissions.

To learn about types of recommendations, see Reduce service costs using Azure Advisor.

Export emission reduction recommendations

You can export emission reduction recommendations using Azure Resource Graph. Run the following query in Azure Resource Graph Explorer. Afterward, you can download the results as CSV.

The export includes:

  • Recommendation ID
  • Subscription ID/Subscription name
  • Resource group name
  • Monthly cost savings
  • Monthly carbon savings in kilograms
  • Resource name
  • Recommendation message
  • Recommendation type
  • Details about the recommendation, including the resource metadata, such as resource ID and role name
// Export emissions reduction recommendations using Azure Resource Graph

advisorresources
  | where tolower(type) == "microsoft.advisor/recommendations"
  | extend RecommendationTypeId = tostring(properties.recommendationTypeId)
  | where RecommendationTypeId in ("94aea435-ef39-493f-a547-8408092c22a7", "e10b1381-5f0a-47ff-8c7b-37bd13d7c974")
  | project stableId=name, subscriptionId, resourceGroup, properties, recommendationId=id
  | join kind=leftouter(
      advisorresources
      | where tolower(type) == 'microsoft.advisor/suppressions'
      | extend tokens = split(id, '/')
      | extend stableId = iff(array_length(tokens) > 3, tokens[(array_length(tokens)-3)], '')
      | extend expirationTimeStamp = todatetime(iff(strcmp(tostring(properties.ttl), '-1') == 0, '9999-12-31', properties.expirationTimeStamp))
      | where expirationTimeStamp > now()
      | project suppressionId = tostring(properties.suppressionId), stableId, expirationTimeStamp
  ) on stableId
  | join kind = leftouter (
      advisorresources
      | where tolower(type) == 'microsoft.advisor/configurations'
      | where isempty(resourceGroup) == true
      | project subscriptionId, excludeRecomm = properties.exclude, lowCpuThreshold = properties.lowCpuThreshold
  ) on subscriptionId
  | extend isActive = iff(isempty(excludeRecomm), true, tobool(excludeRecomm) == false)
  | extend isNotExcludedViaCpuThreshold = iff((isnotempty(lowCpuThreshold) and isnotnull(properties.extendedProperties) and isnotempty(properties.extendedProperties.MaxCpuP95)),
      todouble(properties.extendedProperties.MaxCpuP95) < todouble(lowCpuThreshold),
      iff((isnull(properties.extendedProperties) or isempty(properties.extendedProperties.MaxCpuP95) or todouble(properties.extendedProperties.MaxCpuP95) < 100),
          true,
          false))
  | where isActive == true and isNotExcludedViaCpuThreshold == true
  | join kind = leftouter (
      advisorresources
      | where type =~ 'microsoft.advisor/configurations'
      | where isnotempty(resourceGroup) == true
      | project subscriptionId, resourceGroup, excludeProperty = properties.exclude
  ) on subscriptionId, resourceGroup
  | extend shouldBeIncluded = iff(isempty(excludeProperty), true, tobool(excludeProperty) == false)
  | where shouldBeIncluded == true
  | summarize expirationTimeStamp = max(expirationTimeStamp), suppressionIds = make_list(suppressionId) by recommendationId, stableId, subscriptionId, resourceGroup, tostring(properties)
  | extend isRecommendationActive = (isnull(expirationTimeStamp) or isempty(expirationTimeStamp))
  | extend properties = parse_json(properties)
  | extend monthlyCostSavings = toreal(properties.extendedProperties.savingsAmount)
  | extend monthlyCarbonSavingsKg = toreal(properties.extendedProperties.PotentialMonthlyCarbonSavings)
  | where monthlyCarbonSavingsKg > 0
  | extend resourceId = properties.resourceMetadata.resourceId, resourceName = tostring(properties.extendedProperties.roleName), recommendationMessage = properties.extendedProperties.recommendationMessage, recommendationType=tostring(properties.extendedProperties.recommendationType)
  | project recommendationId, subscriptionId, resourceGroup, suppressionIds, isRecommendationActive, monthlyCostSavings, monthlyCarbonSavingsKg, resourceId, resourceName, recommendationMessage, recommendationType| where isRecommendationActive == true| order by monthlyCarbonSavingsKg desc

Next steps