Red Hat Subscription Reporting Guide

ecommerce-subscription-ts-100621375-large

source: https://www.cio.com/article/3199910/zuora-blazes-a-new-trail-to-the-subscription-economy-and-a-post-erp-world.html

Overview

This article will look at the various options available, to do subscription reporting for Red Hat products. Many large organizations sometimes struggle to keep track of what subscriptions are being used, often maintaining their own spreadsheets. This can be very error prone and time consuming. Systems can even be subscribed to the wrong subscriptions, for example a virtual machine running RHEL using a physical subscription. Many Red Hat customers have several different products, not just RHEL and being able to actively inventory the entire subscription landscape is critical.

Options for Subscription Reporting

There are various options for subscription reporting depending on if you have Satellite (Red Hat Systems Management) or not.

Subscription Entitlement Report 

Starting with Satellite 6.7 there is now a canned report that is very customizable. This is the recommended way of reporting subscriptions in Satellite 6.7+. Provides granular host level subscription reporting.

Example of the out-of-the-box entitlement report is here.

Red Hat Discovery Tool

The discovery tool can do reporting on subscriptions in Satellite and non-Satellite environments. Provides granular host level subscription reporting. This is the recommendation if you don’t have Satellite 6.7+ or have systems not subscribing through Satellite. The discovery tool can be installed in a connected or disconnected environment.

The discovery tool also has an upstream project and is available via the community: https://github.com/quipucords/quipucords

Red Hat Subscription Watch

This is a cloud service offering that can aggregate subscription reporting across various infrastructure or even organizations. Data is sent either from Red Hat Insights or Satellite to a customers portal on cloud.redhat.com. This is a recommended addition to provide additional visibility but does not provide granular information at the host level.

Subscription Inventory Script

Provides granular host level subscription reporting for Satellite environments. This is a script not a product so use at your own risk. However this is recommended if you have Satellite 6.6 or below and cannot for whatever reason leverage the Red Hat Discovery tool.

https://github.com/RedHatSatellite/sat6Inventory/tree/product-cert

Using the Satellite Subscription Inventory Script

Since the other options are products and well documented, I will focus on showing how to do subscription reporting using the inventory script on RHEL 7. First you will need to deploy a RHEL 7 system.

Enable Correct RHEL Repos

First ensure all repositories are disabled and then just enable the rhel-7-server-rpms.

$ sudo subscription-manager repos --disable=*
$ sudo subscription-manager repos --enable=rhel-7-server-rpms

Install python 2.6+

$ sudo yum install -y python

Install Git (Only for connected setup)

$ sudo yum install -y git

Clone git repository (Only for connected setup)

$ git clone https://github.com/RedHatSatellite/sat6Inventory.git

If the system isn’t connected to the internet then you need to download from the git repository. You can download the script from https://github.com/RedHatSatellite/sat6Inventory/tree/product-cert by selecting download. You can then copy the tarball to your system and extract it.

download

Change directory

cd sat6Inventory

Run the inventory script

You need to pass the admin user, password and the Satellite organization.

./sat6Inventory.py -s sat-bc87.rhpds.opentlc.com -l admin -p  \
-o 'EXAMPLE.COM'

The script will output a CSV.

$ ls
EXAMPLE.COM_inventory_report.csv LICENSE README.md Sample Report sat6Inventory.py

You can now import the script output CSV into a spreadsheet program and manipulate as desired.

A sample report is also provided here.

Reconciling mismatched entitlements

If you have a Satellite environment with RHEL physical and VDC (virtual subscriptions) it is possible that a virtual RHEL host is possibly using a physical instead of virtual subscription. To identify such hosts you can run the below command from your Satellite server.

$ sudo foreman-rake katello:virt_who_report

Summary

In this article we covered the various options for doing subscription reporting of Red Hat products. We also showed a short hands-on guide for using the inventory script. Hopefully this provided guidance to choose the most appropriate approach to subscription reporting.

(c) 2020 Keith Tenzer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s