Manage ClickHouse® logs

Filter the logs

You can filter logs by level and by date and time.

Filter logs by level

  1. Go to the Clusters overview page in the console.

  2. Click on your cluster to open its information page.

  3. Open the Logs tab.

  4. By default, all the log levels are selected: you will see a drop-down menu header that reads:

    Trace, Debug, Info, Warning, Error, Fatal [6].

    To exclude one or more log levels from the list, open a drop-down menu and click the level you want to remove.

Filter logs by date and time

  1. Go to the Clusters overview page in the console.

  2. Click on the cluster for which you want to read the logs.

  3. Open the Logs tab.

  4. Select the date and time for which you want to see the logs. The interface structure is the following:

    From DD.MM.YYY HH:MM:SS

    To: DD.MM.YYY HH:MM:SS

    Time Zone (UTC+00:00 by default)

    1. Click on date and time boxes, and you will see a popup calendar you can use to select the appropriate date.

    2. Click on the time zone indicator to select the appropriate time zone from the drop-down menu.

The logs for the selected period will be displayed automatically.

Manage system log tables

To manage system.*_log tables on your ClickHouse® cluster:

  1. Go to the Clusters overview page in the console.

  2. Find the cluster for which you want to manage the log tables and click Edit.

  3. Under Cluster settingsclickhouseConfig, find the system log tables and edit their parameters:

    • Enable and disable the tables (except system.query_log and system.part_log) - the <table-name>_enabled parameter.

    • Change the disk space allowed for the table - the <table-name>_retention_size parameter (in bytes). Set to 0 for unlimited size.

    • Change the table partition's retention time (in seconds) - the <table-name>_retention_time parameter. Set to 0 for infinite 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 maximum number of partitions for the table. Each allows for one partition per day.

Log tables cleanup schedule

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

For a complete list of ClickHouse® system tables and their default parameters, see Default values for system log tables.

See also