Chapter 6. How to set subscription attributes

Your Red Hat subscriptions provide value to software products in use cases that are important to your business. Subscription watch helps you to align your software deployments with the use cases supporting them and compare actual consumption to the capacity provided by the subscription profile of your account.

Red Hat provides a method for you to associate use case information with products through the application of subscription attributes. These subscription attributes can be supplied at product installation time or as an update to the product. Proper, automated maintenance of the subscription attributes for your inventory is important to the accuracy of subscription watch reporting.

Subscription attributes can generally be organized into the following use cases:

technical use case
Attributes that describe how the product will be used upon deployment. For example, role information for RHEL used as a server or workstation.
business use case
Attributes that describe how the product will be used in relation to your business environment and workflows. For example, usage as part of a production or disaster recovery environment.
operational use case
Attributes that describe various operational characteristics such as how the product will be supported. For example, a service level agreement (SLA) of premium, or a service type of L1-L3.

The subscription attributes can be configured from operating system or management tools. Collectively, these subscription attributes might be known as system purpose, subscription settings, or similar names across all of these tools.

Subscription attributes are used by the Cloud Services platform tools such as the inventory tool to build the most accurate usage profile for products in your inventory. Subscription watch uses the subscription attributes found and reported by these other tools to filter data about your subscriptions, enabling you to view this data with more granularity. For example, filtering your RHEL subscriptions to show only those with an SLA of premium could help you determine the current usage of those premium subscriptions compared to your overall capacity for premium subscriptions.

The quality of subscription attribute data can greatly affect the accuracy and usefulness of subscription watch data. Therefore, a best practice is to ensure that these attributes are properly set, both for current use and any possible future expansion of subscription attribute use within subscription watch.

6.1. Setting subscription attributes for RHEL

You can set subscription attributes from RHEL, Red Hat Subscription Management, or Satellite.

As a best practice, you should set the subscription attributes from only one tool. If you use multiple tools, there is a possibility for mismatched settings. Because these tools report data to the Cloud Services platform tools at different intervals, or heartbeats, and because subscription watch shows its results as a once-per-day snapshot based on last-reported data, adding subscription attributes to more than one tool could potentially affect the quality of subscription watch data.

Setting the subscription attributes from RHEL

For RHEL 8 and later, you can use a few different methods to set subscription attributes. These methods, which include using the syspurpose command line tool, are described in a few different contexts in the RHEL 8 documentation. For more information, see the following links:

Note

The syspurpose command line tool has also been added to RHEL 7.7 and later.

Setting the subscription attributes from Red Hat Subscription Management

For Red Hat Subscription Management, the methods to set subscription attributes are contained in the section for registering a system and the descriptions of register commands, but are more fully described in the section related to using system purpose. For more information, see the following link:

Setting the subscription attributes from Satellite

For Satellite, the methods to set subscription attributes are described in instructions for creating a host and editing the system purpose of a host. For more information, see the following link:

  • See the section about administering hosts in the Managing Hosts guide.

6.2. Setting subscription attributes for Red Hat OpenShift

You can set subscription attributes from Red Hat OpenShift Cluster Manager for version 4. For version 3, you use the same reporting tools as those defined for RHEL.

Setting the subscription attributes for Red Hat OpenShift 4

You can set subscription attributes at the cluster level from Red Hat OpenShift Cluster Manager.

  1. From the Clusters view, select a cluster to display the cluster details.
  2. Click Edit Subscription Settings on the cluster details page or from the Actions menu.
  3. Make any needed changes to the values for the subscription attributes and then save those changes.

Setting the subscription attributes for Red Hat OpenShift 3

You can set subscription attributes at the node level by using the same methods that you use for RHEL, setting these values from RHEL itself, Red Hat Subscription Management, or Satellite. As described in that section, set subscription attributes by using only one method so that the settings are not duplicated.

If your subscription contains a mix of socket-based and core-based nodes, you can also set subscription attributes that identify this fact for each node. As you view your Red Hat OpenShift usage, you can use a filter to switch between cores and sockets as the unit of measurement.

To set this subscription attribute data, run the applicable command for each node:

  • For core-based nodes:

    # echo '{"ocm.units":"Cores/vCPU"}' | sudo tee /etc/rhsm/facts/openshift-units.facts
  • For socket-based nodes:

    #  echo '{"ocm.units":"Sockets"}' | sudo tee /etc/rhsm/facts/openshift-units.facts