SUSE Manager/SubscriptionCounting

From MicroFocusInternationalWiki
Revision as of 16:13, 25 January 2017 by Solitarius (Talk | contribs) (Adding category:SUSE Manager)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

How to match Subscriptions to Systems

SUSE Manager 3 automatically generates nightly reports with the matching status of your SUSE subscriptions with all the registered systems.

Those reports are stored in /var/lib/spacewalk/subscription-matcher in CSV format and can be opened with any spreadsheet application such as LibreOffice Calc.

If you want to schedule those reports to be produced at a different time, with a different frequency or if you want to schedule a one-off execution you can do it by editing the Taskomatic settings for the gatherer-matcher bunch:

Admin -> SUSE Manager Configuration -> Task Schedules -> gatherer-matcher-default

Gather Information about Foreign Virtual Hosts

A pre-requirement to match subscriptions to systems is to have complete information about which virtual system runs on which virtual host. SUSE Manager gets this information without any further configuration if the hypervisor is a registered system running on SUSE Linux Enterprise Server or RedHat Enterprise Linux. Third party hypervisors, like VMware or Hyper-V, need configuration described in this page.

Third party hypervisors and hypervisor managers such as VMWare vCenter are called "Virtual Host Managers" (VHM) in SUSE Manager, as they are able to manage one or multiple virtual hosts, which in turn may contain virtual guests.

SUSE Manager 3 ships with a tool (virtual-host-gatherer) that can connect to VHMs using their API, request information about virtual hosts. This tool is automatically invoked via Taskomatic every night. You just need to configure your VHMs via XMLRPC APIs.

virtual-host-gatherer has the concept of optional modules. Each module enables a specific Virtual Host Manager "type" to be used (for example, VMware).

Available virtual-host-gatherer modules

  • VMWare: supports VMware products running on the vSphere operating system, currently VMware ESX, ESXi, and vCenter.
  • File: read data from a plain json file which could be obtained from another virtual-host-gatherer instance (typically from a different disconnected network which has direct access to VHMs) or created manually. See the man page for a specification of the expected json format.

In the future, more modules might be made available, for example to support Microsoft Hyper-V.

Coexistence of the virtual-host-gatherer and poller

virtual-host-gatherer should not be used for gathering the data from hypervisors that are registered systems in SUSE Manager (running SLES or RHEL). Information from such hypervisors is already retrieved using the poller utility and having the redundant information from virtual-host-gatherer may cause problems.

Configuring Virtual Host Managers from the Web UI

The Web UI for configuring the Virtual Host Managers can be found via:

Systems -> Virtual Host Managers

On the Virtual Host Managers tab, you will see a list of already configured VHMs. To add a new VHM, select one of the links in the top right corner, for example, Add VMware-based Virtual Host Manager or Add File-based Virtual Host Managers. After you selected the module, you see the configuration fields. Some could already be filled with typical values for this module.

The VHM is created when you click the Add Virtual Host Manager button.

The new VHM should now be listed in the Overview page. If you click the name, you can see the configuration details of this VHM and you can delete it by clicking the Delete Virtual Host Manager button or trigger a refresh by clicking Refresh data from this Virtual Host Manager.

At the end of a successful run, you will see your Virtual Host Managers in the Systems list.

Configuring Virtual Host Managers via XMLRPC API

The following APIs allow you to get a list of available virtual-host-manager modules and the parameters they require:

  • virtualhostmanager.listAvailableVirtualHostGathererModules(session)
  • virtualhostmanager.getModuleParameters(session, moduleName)

The following APIs allow you to create and delete VHMs. Take care that the module parameter map must match the map returned by virtualhostmanager.getModuleParameters to work correctly:

  • virtualhostmanager.create(session, label, moduleName, parameters)
  • virtualhostmanager.delete(session, label)

The following APIs return information about configured VHMs:

  • virtualhostmanager.listVirtualHostManagers(session)
  • virtualhostmanager.getDetail(session, label)

Running virtual-host-gatherer

The virtual-host-gatherer is a tool which connects to VHMs and returns information about the virtual hosts and virtual systems running on them. In SUSE Manager 3 there is a Taskomatic job executing it nightly.

You can manually start it via the WebUI as with any Taskomatic job:

 Admin => Task Schedules => gatherer-bunch => Single Run Schedule

Additionally you can go to the VHM Overview page at

 Systems => Virtual Host Managers

Behind every item there is a Refresh button which will run the virtual-host-gatherer only for this VHM.

The Subscription Matcher

To match Subscriptions to System we implemented a tool called subscription-matcher. It gets information about systems, subscriptions and pinned matches (fixed customer defined subscriptions to systems mapping) as input and returns the best possible match according to the SUSE Terms and Conditions.

The subscription-matcher is also able to write some CSV Reports:

  • Subscription Report - Subscriptions data with its usage
  • Unmatched Products Report - Products and their Systems for which a match to a subscription could not be found
  • Error Report - a list of errors raised during the matching


The reference page is in the Audit => Subscription Matching section (rhn/manager/subscription_matching url path).

This page presents recalculated results from the output of the matcher:

  • matched on total subscriptions:
    • if the total amount of a subscription is fully matched, the quantity column value is highlighted with a "warning" yellow triangle icon
    • if a subscription is expiring in less than 3 months, the record is highlighted
    • if a subscription is expired, the record is faded
  • table with unmatched products from the latest matching
    • each table row contains
      • unmatched product name
      • the count of unmatched systems with this product installed
      • button for opening a pop-up dialog that contains full list of unmatched systems for given product
  • manage subscription pinning - this feature allows user to instruct the subscription-matcher to favour matching of particular subscriptions to given systems. This is achieved by creating Pins - every pin bears the information about the preferred subscription-system match.
    • the 'Pins' table displays a list of all pins
      • among other information, items in the list contain the status of pins, which can be 'satisfied', 'not satisfied' and 'pending next run'
        • pin is 'satisfied' if its system and subscription was matched in the last matcher run
        • pin is 'not satisfied' if its system and subscription was NOT matched in the last matcher run. This can happen, for instance, if the pin violates terms and conditions for subscriptions.
        • pin is in the 'pending next run' state when it needs a new matcher run to be taken into account. After the new run, pin will become either 'satisfied' or 'not satisfied'.
    • user can add a new pin using the button on the bottom of the page. Clicking this button invokes a 2-step wizard in a pop-up dialog
      • In the first step, user select system from the list
      • In the second step, user selects desired subscription from the list, which creates a new pin between selected system and subscription. NOTE: This list only contains subscriptions that have at least 1 product in common with products installed on the selected system.
    • NOTE (freshness of the data): The pins can be created only on systems and subscriptions that were known to the subscription matcher in the last run (completely fresh systems/subscriptions will not be displayed in the wizard. This data will be updated on the new subscription matcher run)
  • error/warning messages from the latest matching

Below of each table there is a link to download the referenced CSV report.

At the bottom of the page there is the Match status section: this shows latest run infos and a button to schedule a new run of the matcher.