Skip to main content
The default core Kinetica log that records database interactions, startup/shutdown, error information, and more is located at /opt/gpudb/core/logs/gpudb.log. This log file can be configured to use a custom format that conforms to a rolling logging standard, enable various appenders and/or loggers, change the logging level, and more using the /opt/gpudb/core/etc/gpudb_logger.conf file.

Customizing the Log

  1. Review the available Log Levels.
    • OFF
    • FATAL
    • ERROR
    • WARN
    • UERR
    • INFO
    • DEBUG
    • TRACE
    • NOTSET
  2. Review the available Appenders.
    • ToConsole
    • ToSysLog
    • ToFile
    • ToRollingFile
    • ToRollingDatedFile
    • ToBacktraceFile
  3. Review the available Loggers.
  4. Open /opt/gpudb/core/etc/gpudb_logger.conf with a text editor.
  5. Update the rootLogger setting with the desired level and appender(s):
  6. Uncomment the desired appender setting section(s):
  7. Adjust the appender settings as necessary, e.g., log size, threshold, file name, etc.
  8. Adjust additional logger levels and/or appender(s) as necessary:
  9. Save and exit the file.
  10. Restart the host manager and the database:

Log Levels

Log levels can be attributed to the rootLogger (the base logger, default level is INFO), the individual loggers at the bottom of the file, or as the threshold for an appender. The log levels can be ranked in order from least information to most information logged like so: OFF, FATAL, ERROR, WARN, UERR, INFO, DEBUG, TRACE. Some loggers will not provide their information unless a certain level is set. Some loggers may have chained sub loggers; these sub loggers will use the same level as the next logger up the chain (if set). If none of the loggers or sub loggers in the chain are set, the logger will use the rootLogger level. For example, if the following sub logger is NOTSET:
It will use the level of the next logger up the chain:

Appenders

The gpudb_logger.conf file comes with preconfigured appenders that can be used to create different log types. Multiple appenders can be used if necessary as long as the appropriate settings are uncommented and the appender name is added to the rootLogger appender list. Default database setups have the ToConsole appender enabled.
For sizing considerations, a request typically logs for about 500 bytes, but joins and multi-step queries will log quite a bit more.

ToConsole

The Console appender pipes the output of the /opt/gpudb/core/bin/gpudb script to a /opt/gpudb/core/logs/gpudb-<hostname>-<date>.log file. This file is symbolically linked to /opt/gpudb/core/logs/gpudb.log.

ToSysLog

The SysLog appender sends the log output to the centralized SysLog host.

ToFile

The File appender sends each Kinetica process’ (rank and host manager) logs to a separate file.
This appender is demanding in terms of disk space.

ToRollingFile

The Rolling File appender processes logs to a rolling log file where a new log file is created once the previous log file reaches the maximum file size. The maximum file size and number of files to keep is configurable.

ToRollingDatedFile

The Rolling Dated File appender processes logs to a dated rolling log file where a new log file is created (with the time the file is created appended to the name) once the previous log file reaches the maximum file size. The maximum file size and number of files to keep is configurable.

ToBacktraceFile

The Backtrace File appender redirects the backtrace logs generated by the ErrorBacktrace logger so they do not appear in the rootLogger output. Add the ERROR log level and the ToBacktraceFile appender to the ErrorBacktrace like so to properly setup this appender:
It’s advised that this appender also be added to the rootLogger so that logs with a threshold of ERROR are also logged to give context to a backtrace.

Loggers

Loggers control specific types of information. Each logger can have its own log level and appender. If the level or appender are not specified, the rootLogger level and/or appender(s) are used. Loggers are divided into sections:
  • System and process information — memory, CPU
  • GlobalManager and GlobalRegistry — publish and subscribe sockets
  • All ranks (not exclusive to a particular rank) — filter planner, job manager, security manager
  • Head node — endpoint manager, graph client, WMS
  • Worker nodes — bytes and GPU manager, queue, tasks

Auditing

The location of the request auditor logs can also be controlled via the gpudb_logger.conf file. Auditing must be enabled before the logging can be configured; see Auditing for more information. The auditor uses its own appender to separate audit messages from other log messages. All audit messages are at the INFO or ERROR level; it’s recommended the audit log level be kept to at least INFO. If desired, the auditor can use a different appender. The audit log comes with a few preconfigured appender types that are similar to the rootLogger appenders.

Customizing the Log

  1. Review the available Log Levels.
    • OFF
    • FATAL
    • ERROR
    • WARN
    • UERR
    • INFO
    • DEBUG
    • TRACE
    • NOTSET
  2. Review the available Appenders.
    • ToConsole
    • ToSysLog
    • ToFile
    • ToRollingFile
    • ToRollingDatedFile
    • ToBacktraceFile
  3. Open /opt/gpudb/core/etc/gpudb_logger.conf with a text editor.
  4. Adjust the default logger.Audit setting as necessary:
  5. Optionally, update the additivity setting if audit information is desired in both the rootLogger and the audit log. In most cases, this will not need to be updated.
  6. Optionally, uncomment one of the other audit appenders (File or Rolling File). If uncommenting a new appender, the Console appender will need to be commented out.
  7. Adjust the appender settings as necessary, e.g., log size, threshold, file name, etc.
  8. Save and exit the file.
  9. Restart the host manager and the database:

Audit Appenders

Console

The Console appender for the audit log will direct output to the rootLogger file(s).

File

The File appender for the audit log will direct output to a file.

Rolling File

The Rolling File appender for the audit log will direct output to a rolling file.