Sustainability Settings
MetricsHub enriches hardware monitoring data with energy usage metrics such as hw.host.energy, hw.host.heating_margin, and hw.host.power. These metrics enable accurate estimates of electricity costs and carbon emissions for your sites and the resources they host.
To calculate these electricity costs and carbon emissions:
- Define the
siteattribute - Set the carbon intensity, electricity cost, and Power Usage Effectiveness (PUE) .
Step 1: Configure the site Attribute
The site attribute allows dashboards to report electricity costs and carbon footprint per site (for example, per data center, server room, or geographic location).
Configuration differs depending on whether your infrastructure is:
For Highly Distributed Infrastructure
Define the site attribute under the attributes section of each resourceGroups entry.
resourceGroups:
RESOURCE_GROUP_NAME:
attributes:
site: SITE_NAME
resources:
RESOURCE_ID:
attributes:
host.name: HOSTNAME
host.type: TYPE
PROTOCOL_CONFIGURATION
Example:
resourceGroups:
boston:
attributes:
site: boston
resources:
myBostonHost1:
attributes:
host.name: my-boston-host-01
host.type: storage
PROTOCOL_CONFIGURATION
myBostonHost2:
attributes:
host.name: my-boston-host-02
host.type: storage
PROTOCOL_CONFIGURATION
chicago:
attributes:
site: chicago
resources:
myChicagoHost1:
attributes:
host.name: my-chicago-host-01
host.type: storage
PROTOCOL_CONFIGURATION
myChicagoHost2:
attributes:
host.name: my-chicago-host-02
host.type: storage
PROTOCOL_CONFIGURATION
For Centralized Infrastructure
If all monitored resources belong to the same site, define the site attribute once in the main attributes section:
attributes:
site: CENTRAL_SITE
resources:
myCentralHost1:
attributes:
host.name: my-central-host-01
host.type: storage
PROTOCOL_CONFIGURATION
myCentralHost2:
attributes:
host.name: my-central-host-02
host.type: storage
PROTOCOL_CONFIGURATION
Step 2: Configure Sustainability Metrics
Sustainability metrics define the environmental and economic parameters used to calculate electricity costs and carbon emissions.
Place this configuration:
- inside each
resource groupfor distributed infrastructures - in the main
metricssection for centralized infrastructure:
metrics:
hw.site.carbon_intensity: 230 # in g/kWh
hw.site.electricity_cost: 0.12 # in $/kWh
hw.site.pue: 1.8
hw.site.carbon_intensityis the carbon intensity in grams per kiloWatthour. This information is required to calculate the carbon emissions of your site. The carbon intensity corresponds to the amount of CO₂ emissions produced per kWh of electricity and varies depending on the country and the region where the data center is located. See the electricityMap Web site for reference.hw.site.electricity_costis the electricity price in the currency of your choice per kiloWattHour. This information is required to calculate the energy cost of your site. Refer to your energy contract to know the tariff by kilowatt per hour charged by your supplier or refer to the GlobalPetrolPrices Web site. Make sure to always use the same currency for all instances of MetricsHub on all sites to allow cost aggregation in your dashboards that cover multiple sites.hw.site.pueis the Power Usage Effectiveness (PUE) of your site. By default, sites are set with a PUE of 1.8, which is the average value for typical data centers.
You can either hardcode a value or configure MetricsHub to retrieve that information.
Example for Distributed Infrastructure
resourceGroups:
boston:
attributes:
site: boston
metrics:
hw.site.carbon_intensity: 230 # in g/kWh
hw.site.electricity_cost: 0.12 # in $/kWh
hw.site.pue: 1.8
resources:
myBostonHost1:
attributes:
host.name: my-boston-host-01
host.type: storage
PROTOCOL_CONFIGURATION
myBostonHost2:
attributes:
host.name: my-boston-host-02
host.type: storage
PROTOCOL_CONFIGURATION
Example for Centralized Infrastructure
attributes:
site: CENTRAL_SITE
metrics:
hw.site.carbon_intensity: 230 # in g/kWh
hw.site.electricity_cost: 0.12 # in $/kWh
hw.site.pue: 1.8
resources:
myCentralHost1:
attributes:
host.name: my-central-host-01
host.type: storage
PROTOCOL_CONFIGURATION
myCentralHost2:
attributes:
host.name: my-central-host-02
host.type: storage
PROTOCOL_CONFIGURATION