Course Overview
Administering and Operating ClickHouse

Logging In ClickHouse

Lesson #2

In this lesson we will:

  • Lesson contents 1
  • Lesson contents 2
  • Lesson contents 3

Log Files

The ClickHouse log files are useful for debugging any issues, and actually provide a lot of information which may help you resolve users queries. By default, the log files are stored in the following location:

ls -la /var/log/clickhouse-server


drwxrwx--- 1 clickhouse clickhouse   4096 Nov 18 22:31 .
drwxr-xr-x 1 root       root         4096 Nov 18 22:28 ..
-rw-r----- 1 clickhouse clickhouse   4611 Nov 18 22:31 clickhouse-server.err.log
-rw-r----- 1 clickhouse clickhouse 275539 Nov 18 22:40 clickhouse-server.log
-rw-r----- 1 clickhouse clickhouse    451 Nov 18 22:31 stderr.log
-rw-r----- 1 clickhouse clickhouse      0 Nov 18 22:31 stdout.log

YOu can see that we have seperate error and standard output logs which we may wish to monitor or search in case of issues.

Changing ClickHouse Log Level

The ClickHouse server logs are often useful in diagnosing issues and understanding how clients are interacting with ClickHouse. They are however fairly low level and detailed out of the box. At this stage therefore, it is worth reducing the logging level to only show warnings and errors as opposed to trace level logging.

To change this, stop the ClickHouse server using CTRL+C, then open the ClickHouse configuration file:

nano /etc/clickhouse-server/config.xml

And change the ClickHouse logger level from trace to warning:


When you restart the ClickHouse server, you will see fewer logs which are easier to monitor.

Upgrading ClickHouse

Because the data and state is stored in the /var/lib folder, the process of upgrading ClickHouse simply invovles upgrading the service and then restarting.

When the new version starts, the data will be backwards compatible and if necessary, migrated to the new version.

Next Lesson:

Upgrading ClickHouse

In this lesson we will learn about the process for upgrading ClickHouse between versions.

0h 15m

Work With The Experts In Real-Time Analytics & AI

we help enterprise organisations deploy powerful real-time Data, Analytics and AI solutions based on ClickHouse, the worlds fastest open-source database.

Join our mailing list for regular insights:

We help enterprise organisations deploy advanced data, analytics and AI enabled systems based on modern cloud-native technology.

© 2024 Ensemble. All Rights Reserved.