2.5. Subscription Asset Manager: Satellite 5.6 Usage Reports
spacewalk-reports) to export information on the system inventory, organizations and associated subscritions, errata, and users.
2.5.1. About Satellite Consolidated Reports
2.5.1.1. The Advantages of Enhanced Reporting
- Determining actual subscription usage based on system attributes, host/guest relationships, and installed products.
- Tracking historical subcription usage based on subscription statuses at different points in time.
Important
2.5.1.2. Differences in Subscription Statuses from Satellite
2.5.1.3. Syncing Data from Satellite 5.6 to Subscription Asset Manager
- System information (called system facts in Subscription Asset Manager) including the hostname, socket count, any host/guest relationships, and other relevant attributes
- Satellite organizations and associated subscriptions
- User information, including roles and administrator accounts such as Satellite Administrator and Organization Administrator
- Satellite cloned channels and their associated, originating channel.
spacewalk-reports report, using the spacewalk-splice-checkin process. The information then is sent to the Subscription Asset Manager server. This synchronization step is run every four hours, by default.

Figure 25. Satellite 5.6 to Subscription Asset Manager Sync

Figure 26. Subscription Asset Manager to Reporting Server Sync
2.5.1.4. Users in Satellite 5.6 and Subscription Asset Manager
Note
2.5.2. Prerequisites
- A dedicated Subscription Asset Manager instance specifically for Satellite reporting.
Warning
A Subscription Asset Manager instance used for enhanced reporting can only be used as a reporting server for Satellite. It cannot be used as a regular Subscription Asset Manager instance to manage systems or data could be lost. - The
crondservice must be running. - An additional 4 GB of disk space must be available for the reporting database journal.
- Additional packages for the reporting server
- splice
- ruby193-rubygem-splice_reports
- spacewalk-splice-tool
2.5.3. Configuring Reporting
- Install Subscription Asset Manager, including the additional packages.
- 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 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.
2.5.4. Running Reports and Getting Results
- The organizations to check for the report
- The subscription statuses to include
- The date range to check; this looks for systems which had the status within the given range, which may not necessarily be the current status for the system
Note
2.5.4.1. Creating Report Filters
- Click the Reports item in the administration menu.

- In the left column, click the New Filter link.
- Fill in the required information for the report, including the organizations, statuses, date range, and active states.

- Click the button.
2.5.4.2. Running Reports
- Click the Reports item in the administration menu.
- In the left column, click the name of the report filter to run.
- Scroll to the bottom of the report page, and click the button.
Alternatively, the report results can be exported to a CSV file. To export the data, click the button.The data are exported to a CSV file and, optionally, a JSON file which contains the system details. These files are contained in a ZIP archive namedreport-YEAR-MONTH-DAY-TIMESTAMPZ.zip.Note
Selecting the Encrypt export checkbox means that the exported CSV and JSON files are encrypted and can only be accessed by a private key used by Red Hat support.
2.5.4.3. Subscription Asset Manager Reports Results and Data

Figure 27. The Reports Results

Figure 28. The Reports Results: System Details
Note
_id, record, CHECK-IN TIME, STATUS, DB ID, SATELLITE SERVER, HOSTNAME, ORGANIZATION, LIFECYCLE STATE,
{"ident"=>"072c8bdd-ca00-43d4-a000-0887c75b90c8"}, 522e0970af5d242094000002, 2013-09-09T14:23:27Z, "Current", "072c8bdd-ca00-43d4-a000-0887c75b90c8", "sam-server.example.com", "server.example.com", "ACME_Corporation", "Active",[{"_id":{"$oid":"522e0970af5d242094000002"},"_types":["MarketingProductUsage"],"instance_identifier":"072c8bdd-ca00-43d4-a000-0887c75b90c8","updated":"2013-09-09T17:46:24Z","splice_server":"sam13-dlackey-demo","name":"server.example.com","facts":{"memory_dot_memtotal":"3780964", ...2.5.5. Troubleshooting Enhanced Reports
2.5.5.1. Enhanced Reporting Logs
By default, enhanced reporting takes up to 200 MB of additional log space on a system. Logs grow at roughly 750 KB per system per month.
/etc/splice/logging/basic.cfg.
All of the errors, messages, and operations for the sync tool are recorded in a specific tool log at /var/log/splice/spacewalk_splice_tool.log
2.5.5.2. Common Problems
- Q: Why are no systems displayed in the report?
- Q: Why are all systems marked as invalid?
- Q: I updated subscriptions for a system or my Satellite server in Subscription Asset Manager, but those changes are not being reflected in the report.
- Q: The link to the Satellite 5.6 UI in the report results is returning an HTTP 404 error.
- The information isn't being pulled from the Satellite server.
- The information is not being properly transmitted from Subscription Asset Manager into the reporting database.
- The information is not being properly stored in the database.
- The information stored in Subscription Asset Manager is outdated.
/var/log/splice/spacewalk_splice_tool.log.
[root@sam-server ~]# service mongod status [root@sam-server ~]# telnet localhost 27017
[root@sam-server ~]# mongo checkin_service --eval "printjson(db.marketing_product_usage.count())"
[root@sam-server ~]# /usr/bin/splice-debug
/tmp directory name splice-debug-YYYY-MM-DD-TIME. For example, /tmp/splice-debug-2013-06-14-T15-22-19.
[root@sam-server ~]# su - splice -s /bin/bash [splice@sam-server ~]$ spacewalk-splice-checkin
rhn-search process is running on the Satellite 5.6 machine.
2.5.5.3. Other Known Issues
If a Subscription Asset Manager instance used in enhanced reporting has non-Satellite organizations added to it, those organizations may be overwritten and removed in the Subscription Asset Manager database as part of the sync process.
Warning

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.