Logs in Managed Service for ClickHouse®

This article provides information on concepts that will help you understand and better manage logs for your DoubleCloud cluster:

Log entries

Log entry records status or describes certain events in your cluster. These messages tell you that certain events occur in the cluster or show something is wrong and needs attention.

Log entry structure

A log entry contains the complete information on a logged event and consists of the following segments:

  • Date and time stamp in YYYY/MM/DD, HH:MM:SS format.

  • Log level indicator.

  • Entry text.

Log levels

Log level is a piece of status information that tells you how important a log entry is.

Your DoubleCloud cluster supports the following log levels:

Level Description
TRACE Detailed diagnostics information
DEBUG Debugging information
INFO Diagnostics information for statistics
WARNING Warning about a non-critical malfunction. Please investigate further
ERROR Error report
FATAL Possible system failure, cluster shutdown

Default values for system log tables

DoubleCloud Managed Service for ClickHouse® allows you to manage system.*_log tables:

  • Enable and disable the tables (except system.query_log and system.part_log).

  • Change the disk space allowed for the table (in bytes) - retention_size.

  • Change the table partition's retention time (in seconds) - retention_time.

    This parameter is used after conversion into days by the following formula:

    (ceil (table_retention_time / (60 * 60 * 24)))
    

    The resulting number determines the limit of partitions for the table. Each table has one partition per day.

Log tables cleanup schedule

Log tables are cleaned up once every 24 hours, after 0:00 according to the timezone of the cluster's region. This allows the peak usage to exceed the set limits.

system.query_log

You can't turn off this table

You can't apply system.query_log_enabled: false, only change the size and time.

query_log_retention_size

1073741824

query_log_retention_time

2592000

system.query_thread_log

query_thread_log_enabled

true

query_thread_log_retention_size

536870912

query_thread_log_retention_time

2592000

system.query_views_log

query_views_log_enabled

false

query_views_log_retention_size

0

query_views_log_retention_time

2592000

system.part_log

You can't turn off this table

You can't apply system.part_log_enabled: false, only change the size and time.

part_log_retention_size

536870912

part_log_retention_time

2592000

system.metric_log

metric_log_enabled

true

metric_log_retention_size

536870912

metric_log_retention_time

2592000

system.asynchronous_metric_log:

asynchronous_metric_log_enabled

false

asynchronous_metric_log_retention_size

0

asynchronous_metric_log_retention_time

2592000

system.text_log

text_log_enabled

false

text_log_retention_size

536870912

text_log_retention_time

2592000

text_log_level

trace

system.trace_log

trace_log_enabled

false

trace_log_retention_size

536870912

trace_log_retention_time

2592000

system.opentelemetry_span_log

opentelemetry_span_log_enabled

false

opentelemetry_span_log_retention_size

0

opentelemetry_span_log_retention_time

2592000

system.session_log

session_log_enabled

false

session_log_retention_size

0

session_log_retention_time

2592000

system.zookeeper_log

zookeeper_log_enabled

false

zookeeper_log_retention_size

0

zookeeper_log_retention_time

2592000

system.asynchronous_insert_log

asynchronous_insert_log_enabled

false

asynchronous_insert_log_retention_size

0

asynchronous_insert_log_retention_time

2592000

See also