Enabling metering for Red Hat Enterprise Linux with Extended Lifecycle Support in your cloud environment
Table of Contents
NOTE
Metering services are only supported on RHEL 7. Currently, upgrading to RHEL 8 or RHEL 9 for metering services is not supported.
Introduction
Establishing marketplace billing for metered RHEL 7 ELS systems requires completion of four key steps:
- Acquiring an appropriate cloud marketplace subscription. Currently available options are "Red Hat Enterprise Linux for Third Party Linux Migration with ELS" and "Red Hat Enterprise Linux 7 Extended Life Cycle Support (ELS)"
- Establishing a RHEL 7 fleet by converting third party Linux systems with LEAPP (if necessary).
- Adding the Extended Lifecycle Support (ELS) add-on to your Red Hat Enterprise Linux hosts on the appropriate cloud instances.
- Configuring metered billing for your RHEL 7 cloud instances.
Choose your meter
There are two options to meter usage of RHEL 7: the host-metering agent and Red Hat Insights Cost Management.
When to use host-metering
host-metering is a lightweight, OS-level agent that transmits small amounts of host information to Red Hat's subscription services. This is the preferred choice if you do not wish to "tag" cloud instances with subscription-related metadata.
When to use Red Hat Cost Management
Red Hat Insights Cost Management uses instance size and lifespan information from the cloud provider, and is the right choice for customers who do not want a metering process running on the system, sharing OS-level data. This method does require tagging of RHEL 7 ELS instances (described below), to enable remittance for the ELS add-on.
Prerequisite
- You have enabled Simple Content Access to remove system-level entitlement burdens, allowing scalable updates and management of your RHEL 7 ELS systems.
How to meter when you have chosen Insights Cost Management
The following sections will help you enable cost metering through Insights Cost Management on various cloud providers.
AWS
Set up a reporting source
Though AWS tracks your costs, Red Hat needs to access a reporting source for the cost-efficient billing of your new Red Hat Enterprise Linux subscription. You need to export these reports and store them for automated access. For this process, you need to set up an S3 bucket as a source for these reports. For details, see cost management documentation.
Tag your systems
To classify systems, such as, which of them are RHEL instances and which addons they consume, you need to tag them by using AWS cost allocation tags. Cost management service identifies such systems and tracks them in the report. Some tags are essential to identify systems as RHEL instances, while others are optional, like add-on subscriptions that you have elected to add to your systems. To add tags to your systems, see Configuring tags on your integrations. To find a list of available tags, see Adding tags to an AWS resource
Enabling metering service on your AWS Integration
You need to enable metering in your AWS integration on the Hybrid Cloud Console. For detailed steps, see Adding RHEL metering to an integration.
Azure
Set up a reporting source
Though Azure tracks your costs, Red Hat needs access to a reporting source for the cost-efficient billing of your new Red Hat Enterprise Linux subscription. You need to export these reports and store them for automated access. For this process, you need to set up an Azure blob storage bucket as a source for these reports. For details, see cost management documentation.
Tag your systems
To classify systems, such as, which of them are RHEL instances and which addons they consume, you need to tag them by using Azure cost allocation tags. Cost management service identifies such systems and tracks them in the report. Some tags are essential to identify systems as RHEL instances, while others are optional, like add-on subscriptions that you have elected to add to your systems. To add tags to your systems, see Configuring tags on your integrations. To find a list of available tags, see Adding tags to an Azure resource.
Enabling metering service on your Azure Integration
You need to enable metering in your Azure integration on the Hybrid Cloud Console. For detailed steps, see Adding RHEL metering to an integration.
How to meter when you have chosen the host-metering service
This method reports your usage through a dedicated local service, host-metering
, on Red Hat Enterprise Linux 7.9.
Install required packages
The host-metering
package installs the host-metering
tools.
NOTE: The rpm version of subscription-manager
>= 1.24.53-1 is required for host-metering
. Though the dependency updates with the package, manual check is currently required.
$ sudo yum -y update subscription-manager
$ sudo yum -y install host-metering
Install the RHEL Extended Lifecycle Services (ELS) certificate
If you are enabling ELS you will need to retrieve the certificate that entitles your system to use that add-on:
- Visit the Red Hat Product Certificates site
- Select
Red Hat Enterprise Linux
in the drop-down list - In the filter box, enter
Red Hat Enterprise Linux Server - Extended Life Cycle Support
(copy and paste to prevent typos) - Select
7.9
in theSelect a version
drop-down, andx86_64
in theSelect an architecture
drop-down. - Press the
Generate
button and you will be presented with several options for downloading the certificate. Use the one that works best for you.
Refresh your subscription
After downloading the certificate, refresh your entitlements from the server to include the add-ons:
$ sudo subscription-manager refresh
Ensure connectivity for host-metering
The host-metering agent communicates with https://cert.console.redhat.com/api/rhel-telemetry/ . Ensure that your network's firewall is configured to allow connections on port 443 to this host and path.
For proxy services, host-metering makes use of Golang's ability to interpret the HTTP environment variable, which contains proxy settings. Make sure that you have configured your environment to match your proxy server's settings. For more in-depth guidance, please visit https://access.redhat.com/solutions/7077949.
Start the host-metering service
Enable and start the host-metering
service:
$ sudo systemctl enable --now host-metering.service
If the service was already running, restart the service so it picks up the certificate change:
$ sudo systemctl restart host-metering.service
Note: If you purchased the RHEL for third party migrations offering but want a subset of your systems to utilize an existing 1 year or 3 year subscription, make sure that host-metering is not running on those systems.
$ sudo systemctl stop --now host-metering.service
$ sudo systemctl disable host-metering.service
Establishing success
You can confirm that your metering configuration is successful a few ways.
- host-metering logs by default to stderr, and thus will be logged in the system journal. Also, from above: https://access.redhat.com/solutions/7077949
- On an hourly basis, Red Hat's subscriptions service at the hybrid cloud console calculates and sends RHEL 7 ELS remittance to cloud marketplaces. Consult your cloud's cost and usage services to understand when this remittance will be visible to you.
- On a daily basis, Red Hat's subscription service at the hybrid cloud console sums all remittance sent for RHEL 7 ELS usage, and displays it at the RHEL Usage endpoint. You can view this (after up to 24 hours) by applying the filter "RHEL for x86 ELS On-Demand" and observing your total usage on the chart, as well as RHEL 7 ELS instances active during the current calendar month in the "Current Monthly Instances" inventory table.
Comments