How to remove "Monitoring add-on"?

Solution In Progress - Updated -

Environment

Red Hat Satellite 5.7

Issue

  • When we tried to import new certificate, error massage shows like below:
# rhn-satellite-activate --rhn-cert=/root/XXXX.xml -vvv
Certificate specifies 0 of monitoring entitled entitlements.
    There are 86 entitlements used by systems in the base (id 1) organization.
    You might need to unentitle some systems in the base organization.
    You need to free 86 entitlements to match the new certificate.
    In the WebUI, the entitlement is named Monitoring.
Activation failed, will now exit with no changes.
  • We want to free XX Monitoring entitlements by following:
    Overview -> Subscription Management -> System Entitlements
    But we are unable to add or remove Monitoring add-on entitlement because there is no "Monitoring" in the drop-sown list.

Resolution

Workaround

  • The suggested API script below can help to remove the Monitoring Add On entitlements for each system:
#!/usr/bin/perl
use Frontier::Client;
use Data::Dumper;

my $HOST = 'sat.example.com';
my $user = 'rhn-admin';
my $pass = 'password';

my $client = new Frontier::Client(url => "http://$HOST/rpc/api");
my $session = $client->call('auth.login',$user, $pass);
@e = 'monitoring_entitled';

my $systems = $client->call('system.listUserSystems', $session);
foreach my $system (@$systems) {
    $system_id = $system->{'id'};
    $results = $client->call('system.removeEntitlements',$session,$system_id,\@e);
    print " - Removing monitoring Add On for " . $system->{'name'}."\n";
}
$client->call('auth.logout', $session);

Root Cause

  • This is seems to be happening after satellite migration.
# rhn-satellite-activate --rhn-cert=/root/XXXX.xml -vvv
Certificate specifies 0 of monitoring entitled entitlements.
    There are 86 entitlements used by systems in the base (id 1) organization.
    You might need to unentitle some systems in the base organization.
    You need to free 86 entitlements to match the new certificate.
    In the WebUI, the entitlement is named Monitoring.
Activation failed, will now exit with no changes.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.