Chapter 17. Configuring Logs
The Certificate System subsystem log files record events related to operations within that specific subsystem instance. For each subsystem, different logs are kept for issues such as installation, access, and web servers.
All subsystems have similar log configuration, options, and administrative paths.
For details about log administration after the installation, see the Configuring Subsystem Logs section in the Red Hat Certificate System Administration Guide.
For an overview on logs, see Section 2.3.14, “Logs”.
17.1. Certificate System Log Settings
The way that logs are configured can affect Certificate System performance. For example, log file rotation keeps logs from becoming too large, which slows down subsystem performance. This section explains the different kinds of logs recorded by Certificate System subsystems and covers important concepts such as log file rotation, buffered logging, and available log levels.
17.1.1. Services That Are Logged
All major components and protocols of Certificate System log messages to log files. Table 17.1, “Services Logged” lists services that are logged by default. To view messages logged by a specific service, customize log settings accordingly.
Table 17.1. Services Logged
|ACLs||Logs events related to access control lists.|
|Administration||Logs events related to administration activities, such as HTTPS communication between the Console and the instance.|
|All||Logs events related to all the services.|
|Authentication||Logs events related to activity with the authentication module.|
|Certificate Authority||Logs events related to the Certificate Manager.|
|Database||Logs events related to activity with the internal database.|
Logs events related to the HTTP activity of the server. Note that HTTP events are actually logged to the errors log belonging to the Apache server incorporated with the Certificate System to provide HTTP services.
|Key Recovery Authority||Logs events related to the KRA.|
|LDAP||Logs events related to activity with the LDAP directory, which is used for publishing certificates and CRLs.|
|OCSP||Logs events related to OCSP, such as OCSP status GET requests.|
|Others||Logs events related to other activities, such as command-line utilities and other processes.|
|Request Queue||Logs events related to the request queue activity.|
|User and Group||Logs events related to users and groups of the instance.|
17.1.2. Log Levels (Message Categories)
The different events logged by Certificate System services are determined by the log levels, which makes identifying and filtering events simpler. The different Certificate System log levels are listed in Table 17.2, “Log Levels and Corresponding Log Messages”.
Log levels are represented by numbers
10, each number indicating the level of logging to be performed by the server. The level sets how detailed the logging should be.
A higher priority level means less detail because only events of high priority are logged.
The default log level is
1and this value should not be changed. To enable debug logging, see Section 17.3.3, “Additional Configuration for Debug Log”.
Table 17.2, “Log Levels and Corresponding Log Messages” is provided for reference to better understand log messages.
Table 17.2. Log Levels and Corresponding Log Messages
|Log level||Message category||Description|
|0||Debugging||These messages contain debugging information. This level is not recommended for regular use because it generates too much information.|
|1||All logging levels||This log level enables all logging levels.|
|2||Warning||These messages are warnings only and do not indicate any failure in the normal operation of the server.|
|3||Failure; the default selection for system and error logs||These messages indicate errors and failures that prevent the server from operating normally, including failures to perform a certificate service operation (User authentication failed or Certificate revoked) and unexpected situations that can cause irrevocable errors (The server cannot send back the request it processed for a client through the same channel the request came from the client).|
|4||Misconfiguration||These messages indicate that a misconfiguration in the server is causing an error.|
|5||Catastrophic failure||These messages indicate that, because of an error, the service cannot continue running.|
|6||Security-related events|| These messages identify occurrences that affect the security of the server. For example, |
|7||PDU-related events (debugging)||These messages contain debugging information for PDU events. This level is not recommended for regular use because it generates more information than is normally useful.|
|8||PDU-related events||These messages relate transactions and rules processed on a PDU, such as creating MAC tokens.|
|9||PDU-related events||This log levels provides verbose log messages for events processed on a PDU, such as creating MAC tokens.|
|10||Informational (default selection for audit log)||These messages provide general information about the state of the Certificate System, including status messages such as Certificate System initialization complete and Request for operation succeeded.|
Log levels can be used to filter log entries based on the severity of an event. By default, log level 3 (Failure) is set for all services.
The log level is successive; specifying a value of 3 causes levels 4, 5, and 6 to be logged. Log data can be extensive, especially at lower (more verbose) logging levels. Make sure that the host machine has sufficient disk space for all the log files. It is also important to define the logging level, log rotation, and server-backup policies appropriately so that all the log files are backed up and the host system does not get overloaded; otherwise, information can be lost.
17.1.3. Buffered and Unbuffered Logging
The Java subsystems support buffered logging for all types of logs. The server can be configured for either buffered or unbuffered logging.
If buffered logging is configured, the server creates buffers for the corresponding logs and holds the messages in the buffers for as long as possible. The server flushes out the messages to the log files only when one of the following conditions occurs:
- The buffer gets full. The buffer is full when the buffer size is equal to or greater than the value specified by the
bufferSizeconfiguration parameter. The default value for this parameter is 512 KB.
- The flush interval for the buffer is reached. The flush interval is reached when the time interval since the last buffer flush is equal to or greater than the value specified by the
flushIntervalconfiguration parameter. The default value for this parameter is 5 seconds.
- When current logs are read from Console. The server retrieves the latest log when it is queried for current logs.
If the server is configured for unbuffered logging, the server flushes out messages as they are generated to the log files. Because the server performs an I/O operation (writing to the log file) each time a message is generated, configuring the server for unbuffered logging decreases performance.
Setting log parameters is described in the Configuring Logs in the Console section in the Red Hat Certificate System Administration Guide.
17.1.4. Log File Rotation
The subsystem logs have an optional log setting that allows them to be rotated and start a new log file instead of letting log files grow indefinitely. Log files are rotated when either of the following occur:
- The size limit for the corresponding file is reached. The size of the corresponding log file is equal to or greater than the value specified by the
maxFileSizeconfiguration parameter. The default value for this parameter is 100 KB.
- The age limit for the corresponding file is reached. The corresponding log file is equal to or older than the interval specified by the
rolloverIntervalconfiguration parameter. The default value for this parameter is 2592000 seconds (every thirty days).
When a log file is rotated, the old file is named using the name of the file with an appended time stamp. The appended time stamp is an integer that indicates the date and time the corresponding active log file was rotated. The date and time have the forms YYYYMMDD (year, month, day) and HHMMSS (hour, minute, second).
Log files, especially the audit log file, contain critical information. These files should be periodically archived to some backup medium by copying the entire
logdirectory to an archive medium.
The Certificate System does not provide any tool or utility for archiving log files.
The Certificate System provides a command-line utility,
signtool, that signs log files before archiving them as a means of tamper detection.
Signing log files is an alternative to the signed audit logs feature. Signed audit logs create audit logs that are automatically signed with a subsystem signing certificate.
Rotated log files are not deleted.