Este contenido no está disponible en el idioma seleccionado.
Chapter 17. Logging and Reporting Problems
The following sections describe the most commonly used log files and debugging tools available in Satellite.
17.1. Increasing Logging Levels to Help with Debugging Copiar enlaceEnlace copiado en el portapapeles!
You can increase the logging level of Satellite components to troubleshoot Satellite. Increasing the logging level to debug provides the most detailed information. The default logging level is info.
17.1.1. Increasing the Logging Level for the Foreman Application Copiar enlaceEnlace copiado en el portapapeles!
To increase logging for the Foreman Application:
Set the logging level to
debug:satellite-installer --foreman-logging-level debug
# satellite-installer --foreman-logging-level debugCopy to Clipboard Copied! Toggle word wrap Toggle overflow After you complete debugging, reset the logging level to the default value:
satellite-installer --reset-foreman-logging-level
# satellite-installer --reset-foreman-logging-levelCopy to Clipboard Copied! Toggle word wrap Toggle overflow
For more information about Satellite logging settings, use satellite-installer with the --full-help option:
satellite-installer --full-help | grep logging
# satellite-installer --full-help | grep logging
17.1.2. Increasing the Logging Level for Hammer Copiar enlaceEnlace copiado en el portapapeles!
You can find the log in ~/.hammer/log/hammer.log.
To increase logging for Hammer:
-
In
/etc/hammer/cli_config.yml, set the:log_level:option todebug:
:log_level: 'debug'
:log_level: 'debug'
17.1.3. Increasing the Logging Level for Capsule Copiar enlaceEnlace copiado en el portapapeles!
You can find the log in /var/log/foreman-proxy/proxy.log.
To increase logging for Capsule:
Set the logging level to
debug:satellite-installer --foreman-proxy-log-level DEBUG
# satellite-installer --foreman-proxy-log-level DEBUGCopy to Clipboard Copied! Toggle word wrap Toggle overflow After you complete debugging, reset the logging level to the default value:
satellite-installer --reset-foreman-proxy-log-level
# satellite-installer --reset-foreman-proxy-log-levelCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Running satellite-installer will revert the setting back to default.
17.1.4. Increasing the Logging Level for Candlepin Copiar enlaceEnlace copiado en el portapapeles!
You can find the logs in /var/log/candlepin/candlepin.log and /var/log/candlepin/error.log.
To increase logging for Candlepin:
In
/etc/candlepin/candlepin.conf, set the logging level toDEBUG:log4j.logger.org.candlepin=DEBUG
log4j.logger.org.candlepin=DEBUGCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the
tomcatservice:systemctl restart tomcat
# systemctl restart tomcatCopy to Clipboard Copied! Toggle word wrap Toggle overflow
If the candlepin log files are too verbose, you can decrease the default debug level:
log4j.logger.org.candlepin.resource.ConsumerResource=WARN log4j.logger.org.candlepin.resource.HypervisorResource=WARN
log4j.logger.org.candlepin.resource.ConsumerResource=WARN
log4j.logger.org.candlepin.resource.HypervisorResource=WARN
17.1.5. Increasing the Logging Level for Qpid Dispatch Router Copiar enlaceEnlace copiado en el portapapeles!
Qpid logs to syslog. You can view the log in /var/log/messages or with journalctl.
To increase logging for Qpid Dispatch Router:
In
/etc/qpid-dispatch/qdrouterd.conf, set the logging level todebug:enable: debug+
enable: debug+Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the Qpid Dispatch Router:
systemctl restart qdrouterd
# systemctl restart qdrouterdCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Running satellite-installer will revert the setting to default.
17.1.6. Increasing the Logging Level For Qpid Broker Copiar enlaceEnlace copiado en el portapapeles!
Qpid logs to syslog. You can view the log in /var/log/messages or with journalctl.
To increase logging for Qpid Broker:
In
/etc/qpid/qpidd.conf, set the logging level todebug:log-enable=debug+
log-enable=debug+Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart Qpid Broker:
systemctl restart qpidd
# systemctl restart qpiddCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Running satellite-installer will revert the setting to default.
17.1.7. Increasing the Logging Level For Redis Copiar enlaceEnlace copiado en el portapapeles!
You can find the log for Redis in /var/log/redis/redis.log.
To increase logging for Redis:
In
/etc/redis.conf, set the logging level todebug:loglevel debug
loglevel debugCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the Redis service:
systemctl restart redis
# systemctl restart redisCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Running satellite-installer will revert the setting to default.
17.1.8. Increasing the Logging Level For Satellite Installer Copiar enlaceEnlace copiado en el portapapeles!
You can find the log files in /var/log/foreman-installer/.
To increase the logging level of the Satellite installer, add the --verbose-log-level debug option during the installation:
satellite-installer --verbose-log-level debug
# satellite-installer --verbose-log-level debug
17.1.9. Increasing the Logging Level For Pulp Copiar enlaceEnlace copiado en el portapapeles!
By default, Pulp logs to syslog. You can view the log in /var/log/messages or with journalctl.
To increase logging for Pulp:
In
/etc/pulp/settings.py, set the logging level toDEBUG:LOGGING = {"dynaconf_merge": True, "loggers": {'': {'handlers': ['console'], 'level': 'DEBUG'}}}LOGGING = {"dynaconf_merge": True, "loggers": {'': {'handlers': ['console'], 'level': 'DEBUG'}}}Copy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the Pulp services:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
17.1.10. Increasing the Logging Level For Puppet Agent Copiar enlaceEnlace copiado en el portapapeles!
You can find the logs in /var/log/puppetlabs/puppet/.
To increase logging for Puppet agent:
- Ensure Puppet is enabled in your Satellite. For more information, see Enabling Puppet Integration with Satellite in Managing Configurations Using Puppet Integration in Red Hat Satellite.
Set the logging level to
debug:satellite-installer --puppet-agent-additional-settings log_level:debug
# satellite-installer --puppet-agent-additional-settings log_level:debugCopy to Clipboard Copied! Toggle word wrap Toggle overflow
17.1.11. Increasing the Logging Level For Puppet Server Copiar enlaceEnlace copiado en el portapapeles!
You can find the logs in /var/log/puppetlabs/puppetserver/.
To increase logging for Puppet server:
- Ensure Puppet is enabled in your Satellite. For more information, see Enabling Puppet Integration with Satellite in Managing Configurations Using Puppet Integration in Red Hat Satellite.
Set the logging level to
debug:satellite-installer --puppet-server-additional-settings log_level:debug
# satellite-installer --puppet-server-additional-settings log_level:debugCopy to Clipboard Copied! Toggle word wrap Toggle overflow Restart the Puppet server:
satellite-maintain service restart --only puppetserver
# satellite-maintain service restart --only puppetserverCopy to Clipboard Copied! Toggle word wrap Toggle overflow
17.2. Configuring Logging Levels with Hammer CLI Copiar enlaceEnlace copiado en el portapapeles!
You can use Hammer to log debugging information for various Satellite components. The default logging level is INFO.
To list the components whose logging level you can change by using
hammer:hammer admin logging --list
# hammer admin logging --listCopy to Clipboard Copied! Toggle word wrap Toggle overflow To set
DEBUGlevel logging for all components:hammer admin logging --all --level-debug satellite-maintain service restart
# hammer admin logging --all --level-debug # satellite-maintain service restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow To set
PRODUCTIONlevel logging for all components:hammer admin logging --all --level-production satellite-maintain service restart
# hammer admin logging --all --level-production # satellite-maintain service restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow To set
DEBUGlevel logging for a specific component:hammer admin logging --components My_Component --level-debug satellite-maintain service restart
# hammer admin logging --components My_Component --level-debug # satellite-maintain service restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow To list all available logging options:
hammer admin logging --help
# hammer admin logging --helpCopy to Clipboard Copied! Toggle word wrap Toggle overflow
17.3. Configuring Logging to Journal or File-based Logging Copiar enlaceEnlace copiado en el portapapeles!
Satellite uses file-based logging by default. You can use the satellite-installer command to reconfigure logging.
Procedure for configuring logging with Journal
Enter the following
satellite-installercommand to configure logging to thejournaldservice:satellite-installer \ --foreman-logging-layout pattern \ --foreman-logging-type journald \ --foreman-proxy-log JOURNAL
# satellite-installer \ --foreman-logging-layout pattern \ --foreman-logging-type journald \ --foreman-proxy-log JOURNALCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: To inspect the log messages, use the
journalctlutility. For example:-
journalctl --unit foremanandjournalctl --unit foreman-proxyshow messages for theforemanandforeman-proxyunits -
journalctl REQUEST=request_IDshows messages for a specified request
-
Procedure for configuring file-based logging
Enter the following
satellite-installercommand to configure file-based logging:satellite-installer \ --reset-foreman-logging-layout \ --reset-foreman-logging-type \ --reset-foreman-proxy-log
# satellite-installer \ --reset-foreman-logging-layout \ --reset-foreman-logging-type \ --reset-foreman-proxy-logCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: To inspect the log messages, view these files:
-
/var/log/foreman/production.log -
/var/log/foreman-proxy.log
-
Additional resources
For more information about Journal, see Viewing logs using the command line in the Red Hat Enterprise Linux 8 Configuring Basic System Settings Guide.
17.4. Selective Debugging with Individual Loggers Copiar enlaceEnlace copiado en el portapapeles!
You can enable individual loggers for selective debugging.
Procedure
Enable the required individual loggers. For example, to enable
sqlandldaploggers, enter the following command:satellite-installer \ --foreman-loggers ldap:true \ --foreman-loggers sql:true
# satellite-installer \ --foreman-loggers ldap:true \ --foreman-loggers sql:trueCopy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Reset all loggers to their default values:
satellite-installer --reset-foreman-loggers
# satellite-installer --reset-foreman-loggersCopy to Clipboard Copied! Toggle word wrap Toggle overflow
17.5. Overview of Individual Loggers Copiar enlaceEnlace copiado en el portapapeles!
The following list provides an overview of selected loggers. You can find the complete list of loggers with their default values in /usr/share/foreman/config/application.rb under Foreman::Logging.add_loggers.
appLogs web requests and all general application messages.
Default value: true.
auditLogs additional fact statistics, numbers of added, updated, and removed facts.
Default value: true.
background- Logs information from the background processing component.
blobLogs contents of rendered templates for auditing purposes.
ImportantThe
bloblogger might contain sensitive data.dynflow- Logs information from the Dynflow process.
ldapLogs high level LDAP queries and LDAP operations.
Default value: false.
notifications- Logs information from the notifications component.
permissionsLogs queries to user roles, filters, and permissions when loading pages.
Default value: false.
sqlLogs SQL queries made through Rails ActiveRecord.
Default value: false.
telemetry- Logs debugging information from telemetry.
templates- Logs information from the template renderer component.
17.6. Retrieving the Status of Services Copiar enlaceEnlace copiado en el portapapeles!
Satellite uses a set of back-end services. When troubleshooting, you can check the status of Satellite services.
Procedure
In the Satellite web UI, navigate to Administer > About.
- On the Smart Proxies tab, view the status of all Capsules.
- On the Compute Resources tab, view the status of attached compute resource providers.
- In the Backend System Status table, view the status of all back-end services.
CLI procedure
Get information from the database and Satellite services:
hammer ping
# hammer pingCopy to Clipboard Copied! Toggle word wrap Toggle overflow Check the status of the services running in systemd:
satellite-maintain service status
# satellite-maintain service statusCopy to Clipboard Copied! Toggle word wrap Toggle overflow Run
satellite-maintain service --helpfor more information.Perform a health check:
satellite-maintain health check
$ satellite-maintain health checkCopy to Clipboard Copied! Toggle word wrap Toggle overflow Run
satellite-maintain health --helpfor more information.
17.7. Restarting Services Copiar enlaceEnlace copiado en el portapapeles!
Satellite uses a set of back-end services. When troubleshooting, you can restart the services if needed.
Procedure
Restart Satellite services:
satellite-maintain service restart
# satellite-maintain service restartCopy to Clipboard Copied! Toggle word wrap Toggle overflow
17.8. Utilities for Processing Log Information Copiar enlaceEnlace copiado en el portapapeles!
You can collect information from log files to troubleshoot Satellite.
- sosreport
The
sosreportcommand collects configuration and diagnostic information from a Linux system, such as the running Kernel version, loaded modules, running services, and system and service configuration files. This output is stored in a tar file located at/var/tmp/sosreport-XXX-20171002230919.tar.xz.For more information, run
sosreport --helpor see What is a sosreport and how can I create one?.ImportantThe
sosreportcommand removes security information such as passwords, tokens, and keys while collecting information. However, the tar files can still contain sensitive information about the Satellite Server. Send the tar files directly to the intended recipient and not to a public target.- foreman-tail
The
foreman-tailcommand displays Satellite logs in real time.For more information, see the
foreman-tail(8)man page.
17.9. Log File Directories Copiar enlaceEnlace copiado en el portapapeles!
The following table provides an overview of selected log directories on Satellite Server:
| Log file directory | Description of log file content |
|---|---|
|
| Subscription management |
|
| Installer |
|
| Foreman maintain |
|
| Foreman proxy |
|
| Foreman |
|
| Apache HTTP server |
|
| Various other log messages |
|
| Puppet |
|
| Candlepin web service logs |
17.10. System Journal Metadata Copiar enlaceEnlace copiado en el portapapeles!
The following table lists metadata that the journald service uses in Satellite. You can use this metadata to filter your queries.
- AUDIT_ACTION
Audit action performed
Example: Create, update, or delete
- AUDIT_TYPE
Audit resource type
Example: Host, Subnet, or ContentView
- AUDIT_ID
- Audit resource database ID as a number
- AUDIT_ATTRIBUTE
- Audit resource field or an updated database column
- AUDIT_FIELD_OLD
- Old audit value of an update action
- AUDIT_FIELD_NEW
- New audit value of an update action
- AUDIT_ID
- Record database ID of the audit subject
- AUDIT_ATTRIBUTE
Attribute name or column on which an action was performed
Example: Name or description
- EXCEPTION_MESSAGE
- Exception message when error is logged
- EXCEPTION_CLASS
- Exception Ruby class when error is logged
- EXCEPTION_BACKTRACE
- Exception backtrace as a multiline string when error is logged
- LOC_ID
- Location database ID
- LOC_NAME
- Location name
- LOC_LABEL
- Location label
- LOGGER
Logger name
To see the current list of loggers enabled by default, enter this command:
awk '/add_loggers/,/^$/' /usr/share/foreman/config/application.rb
# awk '/add_loggers/,/^$/' /usr/share/foreman/config/application.rbCopy to Clipboard Copied! Toggle word wrap Toggle overflow - ORG_ID
- Organization database ID
- ORG_NAME
- Organization name
- ORG_LABEL
- Organization label
- REMOTE_IP
- Remote IP address of a client
- REQUEST
- Request ID generated by the Action Dispatch module
- SESSION
- Random ID generated per session or a request for a sessionless request
- TEMPLATE_NAME
- Template name
- TEMPLATE_DIGEST
- Digest (SHA256) of rendered template contents
- TEMPLATE_HOST_NAME
- Host name for a rendered template if present
- TEMPLATE_HOST_ID
- Host database ID for a rendered template if present
- USER_LOGIN
- User login name