system.* tables. This guide walks you through the required prerequisites and setup process for self-hosted ClickHouse instances.
Before You Begin
Setup Database Access for the Agent
Connect to your ClickHouse instance usingclickhouse-client as a user with privileges to create users and grant access:
-
Create the
atatususer: -
Grant SELECT access on the
system.*tables the Agent reads:Thesystem.processesandsystem.query_loggrants power query activity, query summary, query completions, query errors, and EXPLAIN collection. Thesystem.parts*,system.mutations,system.replicas, andsystem.replication_queuegrants power MergeTree storage health.
Configure Atatus Infrastructure Agent
- Install the Atatus Infrastructure agent on a host that can connect to your ClickHouse server.
-
Copy the ClickHouse example configuration file:
-
Update the ClickHouse configuration file:
Add the following configuration to
/etc/atatus-infra-agent/conf.d/clickhouse.d/clickhouse.yml:Useclickhouse://host:portfor the native protocol (default port9000) orhttp://host:8123for the HTTP protocol. -
Restart the Atatus Infra Agent:
Verify
Confirm theatatus user can connect and read the core system.* tables:
Enabling TLS (Optional)
If your ClickHouse server requires TLS (for example, when exposing the native protocol on port9440), enable the tls block:
verification_mode: "none" only for self-signed certificates in test environments.
Tuning DBM Feature Toggles (Optional)
Each Database Monitoring feature can be turned on or off individually underdbm_clickhouse_options. By default, every feature is enabled once dbm: true (except query_explain, which can be opted out via enabled: false).
Query Log Tunables
The following options apply toquery_summary, query_completions, query_errors, and query_explain:
EXPLAIN Tunables
Parts and Merges Tunables
Collecting Logs (Optional)
To collect ClickHouse server logs alongside metrics, enable the default log paths or provide custom paths:Overriding the Reported Hostname (Optional)
To report a custom hostname instead of the resolvedhost:port: