Skip to main content
Version: v1.6.x

Monitoring ClickHouse Database Monitoring

Collect and monitor general performance metrics for the ClickHouse database.

Configuration Parameters

Parameter NameParameter Description
Monitor HostIP address, IPV4, IPV6, or domain name of the host being monitored. Note ⚠️ without protocol prefix (e.g., https://, http://).
Task NameName identifying this monitoring, ensuring uniqueness.
PortPort number of the database exposed to the outside, default is 8123.
Query TimeoutTimeout for SQL queries to respond, in milliseconds (ms), default is 6000ms.
Database NameName of the database instance, optional.
UsernameUsername for database connection, optional.
PasswordPassword for database connection, optional.
Collection IntervalInterval for periodic data collection during monitoring, in seconds, with a minimum interval of 30 seconds.
Tag BindingUsed for categorizing and managing monitored resources.
DescriptionAdditional information to identify and describe this monitoring, where users can add remarks.

Collected Metrics

Metric Set: ping Availability

Metric NameMetric UnitMetric Description
responseTimeN/AResponse time

Metric Set: Data from system.metrics table

Metric NameMetric UnitMetric Description
QueryN/ANumber of queries being executed
MergeN/ANumber of background merges being executed
MoveN/ANumber of background moves being executed
PartMutationN/ANumber of table mutations
ReplicatedFetchN/ANumber of data blocks fetched from replicas
ReplicatedSendN/ANumber of data blocks sent to replicas
ReplicatedChecksN/ANumber of consistency checks on data blocks
QueryPreemptedN/ANumber of queries stopped or waiting
TCPConnectionN/ANumber of TCP connections
HTTPConnectionN/ANumber of HTTP connections
OpenFileForReadN/ANumber of open readable files
OpenFileForWriteN/ANumber of open writable files
QueryThreadN/ANumber of threads processing queries
ReadonlyReplicaN/ANumber of Replicated tables in read-only state
EphemeralNodeN/ANumber of ephemeral nodes in ZooKeeper
ZooKeeperWatchN/ANumber of ZooKeeper event subscriptions
StorageBufferBytesBytesBytes in Buffer tables
VersionIntegerN/AClickHouse version number
RWLockWaitingReadersN/ANumber of threads waiting for read-write lock on a table
RWLockWaitingWritersN/ANumber of threads waiting for write lock on a table
RWLockActiveReadersN/ANumber of threads holding read lock on a table
RWLockActiveWritersN/ANumber of threads holding write lock on a table
GlobalThreadN/ANumber of threads in global thread pool
GlobalThreadActiveN/ANumber of active threads in global thread pool
LocalThreadN/ANumber of threads in local thread pool
LocalThreadActiveN/ANumber of active threads in local thread pool

Metric Set: Data from table

Metric NameMetric UnitMetric Description
QueryN/ANumber of queries to parse and possibly execute. Excludes queries rejected due to AST size limits, quota limits, or simultaneous query limits. May include internal queries initiated by ClickHouse. Subqueries are not counted.
SelectQueryN/ANumber of Select queries possibly executed
InsertQueryN/ANumber of Insert queries possibly executed
InsertedRowsN/ANumber of rows inserted into all tables
InsertedBytesBytesNumber of bytes inserted into all tables
FailedQueryN/ANumber of failed queries
FailedSelectQueryN/ANumber of failed Select queries
FileOpenN/ANumber of file openings
MergeTreeDataWriterRowsN/ANumber of data rows written to MergeTree tables
MergeTreeDataWriterCompressedBytesBytesNumber of compressed data bytes written to MergeTree tables

Metric Set: Data from system.asynchronous_metrics table

Metric NameMetric UnitMetric Description
AsynchronousMetricsCalculationTimeSpentN/ATime spent calculating asynchronous metrics (seconds)
jemalloc.arenas.all.muzzy_purgedN/ANumber of purged muzzy pages
jemalloc.arenas.all.dirty_purgedN/ANumber of purged dirty pages
BlockReadBytes_ram1N/ANumber of bytes read from ram1 block
jemalloc.background_thread.run_intervalsN/ANumber of intervals jemalloc background thread ran
BlockQueueTime_nbd13N/AQueue wait time for nbd13 block
jemalloc.background_thread.num_threadsN/ANumber of jemalloc background threads
jemalloc.residentN/APhysical memory size allocated by jemalloc (bytes)
InterserverThreadsN/ANumber of Interserver threads
BlockWriteMerges_nbd7N/ANumber of block write merges for nbd7 block
MarkCacheBytesN/ASize of marks cache in StorageMergeTree
MarkCacheFilesN/ANumber of files in marks cache for StorageMergeTree
MaxPartCountForPartitionN/AMaximum active data blocks in partitions