Show Table of Contents
8.7.3. Configuring Reporting
- Install Subscription Asset Manager as described in Section 2.2, “Basic Installation and Setup for Subscription Asset Manager”, using the additional packages covered in Section 2.3, “Installing and Configuring Enhanced Reporting”.
- Register the host system. Use the
--autoattachoption to attach the required subscriptions for the operating system immediately.[root@server ~]# subscription-manager register --autoattach Username: jsmith@example.com Password:
- Wait several minutes for the updated content repositories to be added to the system configuration.
- Enable the
[rhel-6-server-sam-rpms]repository.[root@server ~]# yum-config-manager --enable rhel-6-server-sam-rpms Loaded plugins: product-id, refresh-packagekit ========================= repo: rhel-6-server-sam-rpms ========================= [rhel-6-server-sam-rpms] bandwidth = 0 base_persistdir = /var/lib/yum/repos/x86_64/6Server baseurl = https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/subscription-asset-manager/1/os cache = 0 cachedir = /var/cache/yum/x86_64/6Server/rhel-6-server-sam-rpms cost = 1000 enabled = 1 enablegroups = True exclude = failovermethod = priority ...
- Install the
katello-headpin-allpackage usingyum install:[root@server ~]# yum install -y katello-headpin-all splice ruby193-rubygem-splice_reports spacewalk-splice-tool
This can also be done when installing from an ISO image (Section 2.2.2, “Installing Through an ISO Image”) by using the--enhanced_reportingoption.[root@server cdrom]# ./install_packages --enhanced_reporting
- The reporting database is a MongoDB database. Set up the Mongo service on the system to start automatically, and then start the service.
[root@sam-server ~]# chkconfig mongod on [root@sam-server ~]# service mongod start
- Run the configuration script to set up the Subscription Asset Manager server, the default admin user, and the initial organization.
[root@server ~]# katello-configure --deployment=sam --org=Example_Org --user-name=samadmin --user-pass=secret
The Subscription Asset Manager admin user is not the same as the Satellite 5.6 admin user. - Still on the Subscription Asset Manager machine, create an SSH key to use to authenticate to the Satellite 5.6 machine.
[root@sam-server ~]# su - splice -s /bin/sh -c 'ssh-keygen -t rsa -f /var/lib/splice/id_rsa-sat -N ""' Generating public/private rsa key pair. Your identification has been saved in /var/lib/splice/id_rsa-sat. Your public key has been saved in /var/lib/splice/id_rsa-sat.pub. The key fingerprint is: 78:fa:c9:68:71:a2:a7:c1:ec:35:e3:43:ce:27:b7:d8 splice@dhcp129-162.rdu.redhat.com The key's randomart image is: +--[ RSA 1024]----+ | | | | | | | . | | . S | | o +o. | | +==+ | | ..+BOo. | | o++=E. | +-----------------+
- Switch to the Satellite 5.6 machine.
- Create a new user which can run the required Satellite reports to sent to the Subscription Asset Manager server.
[root@sat-server ~]# useradd swreport
- Add the key file that was created on the Subscription Asset Manager machine to the
authorized_keysfile for theswreportuser on the Satellite 5.6 machine. Include thecommand=option to restrict theswreportuser to only running Satellite reports on the system.[root@sat-server ~]# vim /home/swreport/.ssh/authorized_keys command="/usr/bin/spacewalk-report $SSH_ORIGINAL_COMMAND" \ ssh-rsa key_hash swreport@sat-server
Thecommanddirective should be all on one line in the keys file. - Set the proper permissions on the
.sshdirectory and theauthorized_keysfile:[root@sat-server ~]# chown -R swreport:swreport /home/swreport/.ssh [root@sat-server ~]# chmod 700 /home/swreport/.ssh [root@sat-server ~]# chmod 600 /home/swreport/.ssh/authorized_keys
- Add the
swreportsuser to theapachesystem group so that it can connect to the database.[root@sat-server ~]# gpasswd -a swreport apache
- Switch back to the Subscription Asset Manager machine.
- Switch to the reporting service user (
splice), and test that the user can SSH into the Satellite machine using theswreportkey.[root@sam-server ~]# su - splice -s /bin/bash [splice@sam-server ~]$ ssh -i /var/lib/splice/id_rsa-sat swreport@sat-server.example.com splice-export
Accept the key fingerprint if prompted. - Edit the reporting configuration to recognize the Satellite 5.6 server.
[root@sam-server ~]# vim /etc/splice/checkin.conf [spacewalk] host=sat-server.example.com ssh_key_path=/var/lib/splice/id_rsa-sat login=swreport
- Edit the reporting configuration to use the Subscription Asset Manager administrator password that was set during the Subscription Asset Manager setup.
admin-pass=secret
- On the Subscription Asset Manager server, run the sync utility to populate the Subscription Asset Manager database with the Satellite 5.6 data.
[root@sam-server ~]# su - splice -s /bin/bash [splice@sam-server ~]$ spacewalk-splice-checkin
Note
This can a long time to run on the initial sync operation.To improve the tool performance, set the number of threads for thespacewalk-splice-toolprocess to use. This should be one thread for every two cores on a low-utilization system or one thread for every three cores on a high-utilization system.For example:[root@sam-server]# /etc/splice/checkin.conf num-threads=3
- Get the Satellite 5.6 manifest from the Customer Portal.
- Log into the Customer Portal.
- Expand the Subscriptions tab, and select the Subscription Management > Subscription Management Applications item.

- Open the Satellite tab.
- If the Portal entry does not already exist, create the Satellite 5.6 entry and attach the required subscriptions.
- In the Satellite tab, click the Register a Satellite link.

- Fill in the required information for the Satellite 5.6 instance:
- The name for the Satellite server entry.
- The version of the Satellite instance; this should be 5.6.

- Click the Register button.
- In the Satellite 5.6 server's Subscriptions tab, select the subscriptions to add in the Available Subscriptions area.
Be sure to set the appropriate quantity of subscriptions for each product selected. The quantity is the total number of subscriptions of that type available to the child organization. - Scroll down, and click the at the bottom of the window.Attaching subscriptions automatically updates the child organization's manifest.
- In the Satellite 5.6 server's entry page, click the button, and save the archive file.

- Log into the Subscription Asset Manager UI (
https://sam-hostname/sam) as a Satellite administrator, and switch to the appropriate Satellite 5.6 organization. - Open the Subscriptions > Subscriptions tab, and click the Import Manifest link.

- In the middle of the import tab, click browse to navigate to the saved manifest file.
- Click the button.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.