Introduction

ClickHouse is an open-source database management system (DBMS) that’s used for online analytical processing (OLAP). It’s designed to process large amounts of data quickly and efficiently.

Usally it exposes Prometheus metrics on https://:8001/metrics

Kubernetes 2.0 ConfigMap

Users should update or append the existing ConfigMap named opsramp-workload-metric-user-config by adding application-specific fields. These fields may include authentication credentials, collection frequency, and other relevant configurations.

apiVersion: v1
kind: ConfigMap
metadata:
  name: opsramp-workload-metric-user-config
  namespace: opsramp-agent
data:
  workloads: |
    clickhouse:
    - name: clickhouse
      collectionFrequency: 59s
      port: 8001
      filters:
        - regex: 'ClickHouseProfileEvents_KeeperCommits'
          action: include
        - regex: 'ClickHouseAsyncMetrics_VMMaxMapCount' 
          action: include
      targetPodSelector:
        matchLabels:
          - key: app.kubernetes.io/name
            operator: ==
            value:
              - clickhouse

Supported Metrics

Supported metrics for this workload as provided by the Kubernetes 2.0 Agent.

MetricDescription
ClickHouseProfileEvents_QueryTotal number of queries executed in ClickHouse.
ClickHouseProfileEvents_SelectQueryTotal number of SELECT queries executed.
ClickHouseProfileEvents_InsertQueryTotal number of INSERT queries executed.
ClickHouseProfileEvents_InitialQueryTracks the number of initial queries executed (root queries).
ClickHouseProfileEvents_QueriesWithSubqueriesNumber of queries that contain subqueries.
ClickHouseProfileEvents_SelectQueriesWithSubqueriesNumber of SELECT queries that contain subqueries.
ClickHouseProfileEvents_InsertQueriesWithSubqueriesNumber of INSERT queries that contain subqueries.
ClickHouseProfileEvents_SelectQueriesWithPrimaryKeyUsageNumber of SELECT queries utilizing a primary key for filtering.
ClickHouseProfileEvents_AsyncInsertQueryNumber of asynchronous INSERT queries executed.
ClickHouseProfileEvents_AsyncInsertBytesTotal bytes processed by asynchronous INSERT queries.
ClickHouseProfileEvents_AsyncInsertRowsTotal rows inserted asynchronously.
ClickHouseProfileEvents_AsyncInsertCacheHitsNumber of cache hits for asynchronous INSERT queries.
ClickHouseProfileEvents_FailedQueryNumber of queries that failed execution.
ClickHouseProfileEvents_FailedSelectQueryNumber of SELECT queries that failed execution.
ClickHouseProfileEvents_FailedInsertQueryNumber of INSERT queries that failed execution.
ClickHouseProfileEvents_FailedAsyncInsertQueryNumber of failed asynchronous INSERT queries.
ClickHouseProfileEvents_QueryTimeMicrosecondsTotal execution time of queries in microseconds.
ClickHouseProfileEvents_SelectQueryTimeMicrosecondsTotal execution time of SELECT queries in microseconds.
ClickHouseProfileEvents_InsertQueryTimeMicrosecondsTotal execution time of INSERT queries in microseconds.
ClickHouseProfileEvents_OtherQueryTimeMicrosecondsTotal execution time of non-SELECT, non-INSERT queries in microseconds.
ClickHouseMetrics_QueryCurrent number of executing queries.
ClickHouseMetrics_MergeCurrent number of active merge operations.
ClickHouseMetrics_MoveCurrent number of part move operations.
ClickHouseMetrics_PartMutationNumber of active part mutations.
ClickHouseMetrics_ReplicatedFetchNumber of fetch operations from replicated tables.
ClickHouseMetrics_ReplicatedSendNumber of data replication send operations.
ClickHouseMetrics_ReplicatedChecksNumber of consistency checks on replicated data.
ClickHouseMetrics_BackgroundMergesAndMutationsPoolTaskNumber of background merge and mutation tasks.
ClickHouseMetrics_BackgroundMergesAndMutationsPoolSizeSize of the background merge and mutation pool.
ClickHouseMetrics_BackgroundFetchesPoolTaskNumber of background fetch tasks.
ClickHouseMetrics_BackgroundFetchesPoolSizeSize of the background fetch pool.
ClickHouseMetrics_CacheDictionaryUpdateQueueBatchesNumber of batched updates in the cache dictionary update queue.
ClickHouseMetrics_CacheDictionaryUpdateQueueKeysNumber of keys waiting for update in the cache dictionary.
ClickHouseMetrics_DiskSpaceReservedForMergeAmount of disk space reserved for ongoing merges.
ClickHouseMetrics_QueryPreemptedNumber of queries that were preempted due to resource limits.
ClickHouseMetrics_TCPConnectionCurrent number of active TCP connections.
ClickHouseMetrics_MySQLConnectionNumber of active MySQL connections.
ClickHouseMetrics_HTTPConnectionNumber of active HTTP connections.
ClickHouseMetrics_InterserverConnectionNumber of active inter-server connections.
ClickHouseMetrics_PostgreSQLConnectionNumber of active PostgreSQL connections.
ClickHouseMetrics_OpenFileForReadNumber of files currently open for reading.
ClickHouseMetrics_OpenFileForWriteNumber of files currently open for writing.
ClickHouseMetrics_CompressingNumber of active compression operations.
ClickHouseMetrics_DecompressingNumber of active decompression operations.
ClickHouseMetrics_TemporaryFilesForSortNumber of temporary files used for sorting operations.
ClickHouseMetrics_TemporaryFilesForAggregationNumber of temporary files used for aggregations.
ClickHouseMetrics_ReadCurrent number of read operations.
ClickHouseMetrics_WriteCurrent number of write operations.
ClickHouseMetrics_KafkaConsumersNumber of active Kafka consumers.
ClickHouseMetrics_KafkaProducersNumber of active Kafka producers.
ClickHouseAsyncMetrics_OSGuestTimeTotal CPU time spent in guest mode.
ClickHouseAsyncMetrics_BlockWriteTime_nbd5Total time spent writing blocks to the nbd5 device.
ClickHouseAsyncMetrics_NetworkReceiveErrors_eth0Number of network receive errors on eth0 interface.
ClickHouseAsyncMetrics_BlockReadTime_nbd2Total time spent reading blocks from the nbd2 device.
ClickHouseAsyncMetrics_BlockWriteBytes_vdaTotal bytes written to the vda block device.