Cost & Carbon Optimization

  • Latest Dynatrace
  • Overview
  • 8-min read
  • Calculates your IT carbon footprint at the data center, host, and Kubernetes infrastructure levels for multi hybrid-cloud infrastructure.
  • Calculates your IT cost based on public price list from cloud vendors for each region and at host level.
  • Translates utilization metrics—including CPU, memory, disk, and network I/O—into energy consumption in kWh and CO2 equivalents (CO2e).
  • Reports energy consumption, carbon dioxide emissions, and list price costs in a single interface—with drill-downs into physical hosts and Kubernetes infrastructure.
  • Identifies opportunities to reduce costs and carbon emissions.

Permissions

The following table describes the required permissions.

Permission
Description
app-engine:apps:run
Run the Cost & Carbon Optimization app
state:app-states:delete
Delete workflow execution metadata
app-engine:functions:run
Run the Cost & Carbon Optimization data calculation and ingest
storage:events:write
Store Cost & Carbon Optimization events in GRAIL
storage:entities:read
Read entities from GRAIL
state:app-states:read
Read configuration and workflow metadata from app-states
state:app-states:write
Writes configuration and workflow metadata to app-states
automation:workflows:read
Read Cost & Carbon Optimization data ingest automation related data
automation:workflows:write
Creates/edits the Cost & Carbon Optimization data ingest automation
storage:bizevents:read
Read Cost & Carbon Optimization events from GRAIL

Grant permissions to Workflows

Check if Workflows has the required permissions to run automations: open Workflows Workflows, select Settings > Authorization settings in the upper-right corner, and ensure that the following settings are enabled.

  • app-engine:apps:run
  • app-engine:functions:run
  • app-settings:objects:read
  • automation:workflows:read
  • automation:workflows:write
  • environment-api:entities:read
  • iam:bindings:read
  • state:app-states:read
  • state:app-states:write
  • state:app-states:delete
  • storage:bizevents:read
  • storage:buckets:read
  • storage:entities:read
  • storage:events:write
  • storage:metrics:read

For more information, see Manage user permissions with IAM policies and Workflow authorization settings.

Installation

Make sure the app is installed in your environment.

Carbon dioxide emissions and energy consumption are calculated for hosts that are set up and monitored with OneAgent. Energy calculations are based on observed infrastructure metrics.

  1. In Cost & Carbon Optimization Cost & Carbon Optimization, go to the Hosts tab.
  2. Check that you have at least one host instrumented.
  • The data generation of carbon emissions must be active to allow generating public pricing cloud costs. You can activate it in the app's settings.

  • You need instrumented hosts with OneAgent and cloud vendor monitoring configured. The calculation of public price list costs requires the collection of metadata from a host as the cloud provider, cloud region, and the type of instance configured in the cloud vendor. This information is provided by configuring the cloud vendor monitoring for the hosts to be monitored with OneAgent. For more information, see Ingest data.

  • Enable External requests to the cloud vendors where the hosts are running to collect public price lists into Grail.

    External requests enable outbound network connections from your Dynatrace environment to external services. They allow you to control access to public endpoints from the AppEngine with app functions and functions in Dashboards, Notebooks, and Automations.

    1. Go to Settings Settings > General > Environment management, External requests.

    2. Select New host pattern.

    3. Add the domain names.

    4. Select Add.

    This way you can granularly control the web services your functions can connect to.

    You need to add the following domain names

    • For AWS, add *.amazonaws.com

    • For Azure, add azure.microsoft.com

    • For Google Cloud, add cloudbilling.googleapis.com

Dynatrace Cost & Carbon Optimization Cost & Carbon Optimization enables you to calculate and monitor your IT cost (public list price) and carbon footprint.

It tracks, reports, and helps you optimize the costs from your cloud infrastructure and reduce your carbon emissions resulting from your cloud and on-premises infrastructure electricity consumption.

Landing page

The Overview tab provides an at-a-glance view of your IT carbon footprint.

Cost & Carbon Optimization overview page summarizes carbon emissions, energy consumption, cloud costs, and optimization targets.
1 of 1Cost & Carbon Optimization overview page summarizes carbon emissions, energy consumption, cloud costs, and optimization targets.
  • The Carbon & Energy Footprint summary reports total CO2e emissions for the selected and preceding timeframes for quick interval-based comparisons.
  • Wasted energy summary is also reported with the selected and preceding timeframe.
  • Publicly listed cloud costs report the sum of cloud costs for Dynatrace-monitored hosts for the user-selected timeframe, using publicly available list prices from each cloud provider. Costs are displayed for the selected and preceding timeframes.
  • Optimization recommendations reports idle hosts and underutilized hosts with their cost and wasted energy measured.

    To adjust thresholds influencing these calculations to your needs, navigate to the upper-right corner and select to open the app's settings.

  • The Accumulated carbon footprint over time chart shows the accumulated carbon footprint and energy consumption over time.

  • With the Carbon versus business KPI chart, you can compare carbon emissions over time with a business key performance indicator (KPI) of your choice, derived from any of your captured business events.

  • If cloud costs are calculated, two more charts display Accumulated cloud cost over time and Cloud cost versus business KPI defined.

  • Carbon/energy data is measured for all hosts monitored by Dynatrace OneAgent, or by Dynatrace Kubernetes monitoring.

Hosts

This tab allows you to view energy, carbon emissions, costs, and utilization information for OneAgent-monitored hosts.

Host page displays host-level carbon, energy, cloud costs and optimization status

  • The table includes all hosts with carbon/cost information for the user-selected timeframe, and displays metadata, energy consumption, CO2 equivalent, and cloud costs (cloud hosts only).
  • Use the information from this table to identify and optimize hosts with low utilization and high energy consumption, high carbon emissions, and high costs.
  • The table allows you to search for specific hosts, filter by data center, or filter by optimization state (Idling, Scaling, Normal—thresholds are defined in the app's settings).
  • Expand a host to see if average CPU, memory and network traffic utilization for the user-selected timeframe.
  • The page includes an intent that allows you to query the underlying data using DQL in a notebook or dashboard and combine the carbon and energy data with other information in Dynatrace. This can be useful to customize optimization information using DQL. Tabular information can be downloaded to a CSV file by selecting the download link.
  • This view includes only hosts that are monitored by Dynatrace OneAgent. Kubernetes infrastructure is shown in the Kubernetes tab. Cloud hosts not monitored by Dynatrace OneAgent are not displayed here.

Kubernetes

Cost & Carbon Optimization Cost & Carbon Optimization works only for Kubernetes monitoring on Grail; classic Kubernetes monitoring is not supported.

This tab allows you to view energy, carbon emissions, and utilization information for Kubernetes infrastructure monitored by Dynatrace.

Kubernetes clusters GAKubernetes Namespaces GA
1 of 2

Use the Kubernetes view to explore the energy consumption and carbon emissions of Kubernetes clusters, namespaces, and nodes by selecting the relevant link at the top of the page. Each view provides you with:

  • A textual summary of carbon emissions and energy consumption
  • Charts of the carbon emissions and energy consumption over the user-selected timeframe.
  • A table of carbon emissions, energy consumption, and the relevant metadata for each Kubernetes entity.

Provides a breakdown of carbon emissions and energy consumption for each monitored cluster, with an average count of nodes, namespaces, and workloads seen during the user-selected timeframe.

You can filter the table by cluster deployment type (for example, EKS, AKS, GKE) and search for a specific cluster names.

See Average vs. actual values for additional information on the use of average and actual counts.

The Clusters and Namespaces views

  • Provide contextual navigation to the Kubernetes entity in Kubernetes (new) Kubernetes by selecting the cluster, namespace, or node link in the table.
  • List the average CPU and memory allocatable to help understand each entity's hardware resources.
  • Include an intent that allows you to query the underlying data using DQL in a notebook or dashboard and combine the carbon and energy data with other information in Dynatrace. Tabular information can be downloaded to a CSV file by selecting the download link.
  • The % metric change is also shown in each view, enabling you to quickly determine whether the scope or emissions of a Kubernetes entity have increased/decreased for the selected timeframe.

Use this information to

  • Identify Kubernetes clusters and namespaces with the highest energy consumption and carbon emissions, and correlate this with Dynatrace Kubernetes (new) Kubernetes information on CPU and memory slack to identify the most costly and underutilized Kubernetes resources. Leverage this information with your application teams to reconsider optimizing their requests/limits to reduce slack and optimize carbon and costs.

    One-click navigation between Cost & Carbon Optimization Cost & Carbon Optimization and Kubernetes (new) Kubernetes allows you to quickly drill down into more information about the Kubernetes resources to inspect resource requests and limits, quotas, or idle workloads/jobs that reserve resources but run infrequently.

  • Track energy and carbon at the Kubernetes cluster and namespace over time and identify anomalies that need further investigation to understand what changed in the environment and whether the change was intentional and warranted. A large spike (increase) in energy and carbon could be a normal side effect of increased usage, but it could signal an issue or change with automatic scaling or resource provisioning. Examples: Changes to the type of node instances being used, or an unnecessary increase in associated storage.

  • Measure and compare carbon emissions from single-use servers to Kubernetes infrastructure to ensure that migration efforts are meeting the desired sustainability goals. Organizations may even consider gamifying this and challenging their engineering teams to develop solutions that delight end-users and the environment.

Average vs. actual values

Kubernetes is a dynamic environment, and the number of nodes and pods changes continuously.

When reporting on carbon and energy over longer timeframes, counts can be derived using the average count of nodes, pods, and other entities observed during the user-selected timeframe, or a more in-depth query can be made to the Kubernetes data in Grail to get actual distinct counts of each entity.

In a large Kubernetes environment, an actual count of distinct entities can take several seconds, whereas the average count typically takes milliseconds, and is sufficient for most use cases.

This selector may account for differences between Cost & Carbon Optimization Cost & Carbon Optimization and Kubernetes (new) Kubernetes.

The query time for the actual data is dependent on the size of your Kubernetes infrastructure and the timeframe being analyzed.

  • Using actual data over a 7-day period could take minutes, not seconds.
  • Querying namespace actual data is significantly heavier than clusters or nodes, and we recommend using a short timeframe (1-2d) when using actual data within the Namespaces tab.

When using the deployment mode Kubernetes platform monitoring + Application observability, nodes and namespaces can be excluded from monitoring using the namespaceSelector (and nodeSelector).

As Cost & Carbon Optimization Cost & Carbon Optimization only reports on the energy/carbon of namespaces/nodes that are monitored, energy and carbon emissions shown may be lower than expected when infrastructure is excluded from monitoring. Excluded namespaces will be displayed in the Namespaces table but will show no carbon/energy measurements.

In addition, internal workloads (such as coredns, traefik, and more) may be running that are not monitored by Dynatrace and energy/carbon data will not be included in the measurements.

Learning modules

Go through the following process to learn using Cost & Carbon Optimization Cost & Carbon Optimization:

Troubleshooting

This popup error message will list the permissions needed to use Cost & Carbon Optimization Cost & Carbon Optimization.

Ensure that a Dynatrace IAM administrator adds these policies to your user/group.

  • There's no data to display, potentially due to the timeframe selected, or due to carbon data not being generated correctly.

  • If you enabled Cost & Carbon Optimization Cost & Carbon Optimization recently, please wait for up to 1-2 hours for the workflow to execute and start generating carbon data.

  • You can check whether carbon or carbon Kubernetes data is being generated by running the following DQL in a notebook. Select the icon on the page, right above any table in the Hosts or Kubernetes tabs, to Open with the underlying DQL in a notebook:

    fetch bizevents
    filter event.type == "carbon.measurement" or event.type == "carbon.measurement.k8s.cluster"
  • Ensure that the Cost & Carbon Optimization workflow has the required authorization settings to function.

    Open Cost & Carbon Optimization Cost & Carbon Optimization settings page. If this is the problem, an error message with missing authorization settings will be displayed theres.

  • Ensure that the Cost & Carbon Optimization workflow is scheduled to run every hour, that all steps within the workflow are enabled (not disabled), and that no errors are generated by the workflow.

    Review any workflow errors for further troubleshooting or contact our customer support.

  • A platform issue is preventing the app from executing queries to report on carbon Kubernetes data.

    The issue may be temporary and will resolve itself shortly, or please reach out to our customer support.

  • Kubernetes monitoring may not be set up or functioning correctly.

    Please check Kubernetes (new) Kubernetes to ensure that your Kubernetes infrastructure is being monitored correctly.

Related tags
Business ObservabilityCost & Carbon OptimizationCost & Carbon OptimizationKubernetes (new)KubernetesNotebooksNotebooks