Chapter 12. Logging and Reporting Problems

This chapter provides information on how to log and report problems in Red Hat Satellite Server, including information on relevant log files, how to enable debug logging, how to open a support case and attach the relevant log tar files, and how to access support cases within the Satellite web UI.

You can use the log files and other information described in this chapter to do your own troubleshooting, or you can capture these and many more files, as well as diagnostic and configuration information, to send to Red Hat Support if you need further assistance.

For more information about Satellite logging settings, use satellite-installer with the --full-help option:

# satellite-installer --full-help | grep logging

12.1. Enabling Debug Logging

Debug logging provides the most detailed log information and can help with troubleshooting issues that can arise with Satellite 6.8 and its components.

In the Satellite CLI, enable debug logging to log detailed debugging information for Satellite 6.8.

Procedure

To enable debug logging, complete the following steps on your Satellite Server.

  1. To enable debug logging, enter the following command :

    # satellite-installer --foreman-logging-level debug
  2. After you complete debugging, reset the logging level to the default value:

    # satellite-installer --reset-foreman-logging-level

12.2. Enabling Individual Loggers

You can enable individual loggers for selective logging. Satellite uses the following loggers:

app
Logs web requests and all general application messages. Default value: true.
audit
Logs additional fact statistics, numbers of added, updated, and removed facts. Default value: true.
ldap
Logs high level LDAP queries and LDAP operations. Default value: false.
permissions
Logs queries to user roles, filters, and permissions when loading pages. Default value: false.
sql
Logs SQL queries made through Rails ActiveRecord. Default value: false.

Procedure

To enable individual loggers, complete the following steps.

  1. Enable the individual loggers that you want. For example, to enable sql and ldap loggers, enter the following command:

    # satellite-installer --foreman-loggers sql:true --foreman-loggers ldap:true
  2. Optional: To reset loggers to their default values, enter the following command:

    # satellite-installer --reset-foreman-loggers

12.3. Configuring Logging to Journal

You can configure Satellite to manage logging with Journal. Journal then forwards log messages to rsyslog and rsyslog writes the log messages to /var/log/messages. Note that after this change the log messages do not appear in /var/log/foreman/production.log or /var/log/foreman-proxy.log any more.

For more information about Journal, see Using the Journal in the Red Hat Enterprise Linux 7 System Administrator’s guide.

Procedure

To configure Satellite Server logging with Journal, complete the following steps:

  1. Enter the following satellite-installer command to configure logging to journald:

    # satellite-installer --foreman-logging-level info \
    --foreman-logging-type journald \
    --foreman-logging-layout pattern --foreman-proxy-log JOURNAL
  2. Restart the Apache daemon:

    # satellite-maintain service restart --only httpd

12.4. Log File Directories Provided by Satellite

Red Hat Satellite provides system information in the form of notifications and log files.

Table 12.1. Log File Directories for Reporting and Troubleshooting

Log File DirectoriesDescription of Log File Content

/var/log/candlepin

Subscription management

/var/log/foreman

Foreman

/var/log/foreman-proxy

Foreman proxy

/var/log/httpd

Apache HTTP server

/var/log/foreman-installer/satellite

Satellite installer

/var/log/foreman-installer/capsule

Capsule Server installer

/var/log/libvirt

Virtualization API

/var/log/mongodb

Satellite database

/var/log/production

Foreman

/var/log/pulp

Celerybeat and Celery startup request messages. After startup is complete, messages are logged to /var/log/messages.

/var/log/puppet

Configuration management

/var/log/rhsm

Subscription management

/var/log/tomcat6 and /var/log/tomcat

Apache web server messages for Red Hat Enterprise Linux 6 and Red Hat Enterprise Linux 7, respectively.

/var/log/messages

Various other log messages related to pulp, rhsm, and goferd.

You can also use the foreman-tail command to follow many of the log files related to Satellite. You can run foreman-tail -l to list the processes and services that it follows.

12.5. Utilities for Collecting Log Information

There are two utilities available to collect information from log files.

Table 12.2. Log Collecting Utilities

CommandDescription

foreman-debug

The foreman-debug command collects configuration and log file data for Red Hat Satellite, its back-end services, and system information. This information is collected and written to a tar file. By default, the output tar file is located at /tmp/foreman-debug-xxx.tar.xz.

Additionally, the foreman-debug command exports tasks run during the last 60 days. By default, the output tar file is located at /tmp/task-export-xxx.tar.xz. If the file is missing, see the file /tmp/task-export.log to learn why task export was unsuccessful.

For more information, run foreman-debug --help.

There is no timeout when running this command.

sosreport

The sosreport command is a tool that collects configuration and diagnostic information from a Red Hat Enterprise Linux system, such as the running kernel version, loaded modules, and system and service configuration files. The command also runs external programs (for example: foreman-debug -g) to collect Satellite-specific information, and stores this output in a tar file.

By default, the output tar file is located at /var/tmp/sosreport-XXX-20171002230919.tar.xz. For more information, run sosreport --help or see What is a sosreport and how can I create one?.

The sosreport command calls the foreman-debug -g and times out after 500 seconds. If your Satellite Server has large log files or many Satellite tasks, support engineers may require the output of sosreport and foreman-debug when you open a support case.

Important

Both foreman-debug and sosreport remove security information such as passwords, tokens, and keys while collecting information. However, the tar files can still contain sensitive information about the Red Hat Satellite Server. Red Hat recommends that you send this information directly to the intended recipient and not to a public target.