---
title: Monitoring Deployment
slug: telemetry-pipeline/monitoring-deployment
docTags: 
createdAt: 2026-01-06T07:54:18.424Z
---

### 1. ClickHouse Installation

**1.1 ClickHouse Setup**

:::BlockQuote
sudo dnf install -y curl ca-certificates
sudo curl https\://builds.altinity.cloud/yum-repo/altinity.repo \\
-o /etc/yum.repos.d/altinity.repo
sudo dnf install -y clickhouse-server clickhouse-client
sudo systemctl enable clickhouse-server
sudo systemctl start clickhouse-server
sudo systemctl status clickhouse-server
:::

**1.2 Installation Verification and Table Creation**

Connect to ClickHouse:

:::BlockQuote
clickhouse-client
:::

Check version:

:::BlockQuote
SELECT version();
:::

Create tables:

:::BlockQuote
USE monitoring;

DROP TABLE IF EXISTS event\_sampling;

CREATE TABLE event\_sampling (
&#x20; event\_id UUID,
&#x20; insert\_time DateTime,
&#x20; component\_id String,
&#x20; component\_type String,
&#x20; component\_kind String,
&#x20; string String,
&#x20; timestamp String,
&#x20; message String,
&#x20; name String,
&#x20; namespace String,
&#x20; kind String,
&#x20; value\_type String,
&#x20; value String
)
ENGINE = MergeTree
ORDER BY insert\_time
TTL insert\_time + INTERVAL 1 DAY;
:::

:::BlockQuote
CREATE TABLE monitoring\_metric (
&#x20; name String,
&#x20; timestamp DateTime64(3),
&#x20; tags Tuple(
&#x20;   component\_id LowCardinality(String),
&#x20;   component\_kind LowCardinality(String),
&#x20;   host LowCardinality(String)
&#x20; ),
&#x20; value Float64
)
ENGINE = MergeTree
ORDER BY (timestamp, name)
SETTINGS index\_granularity = 8192;
:::

Verify tables:

:::BlockQuote
SHOW TABLES;
DESCRIBE TABLE event\_sampling;
DESCRIBE TABLE monitoring\_metric;
:::

**1.3 CMS – ClickHouse Integration**

**Same server setup:**

:::BlockQuote
MONITOR\_CH\_HOST: http\://127.0.0.1:8123
MONITOR\_CH\_PORT: 8123
MONITOR\_CH\_DB: vectorlogs
MONITOR\_CH\_USER: default
MONITOR\_CH\_PASS: kron
MONITOR\_CH\_TABLE: monitoring\_metric
:::

**Different server setup:**
&#x20;Edit ClickHouse config:

:::BlockQuote
sudo nano /etc/clickhouse-server/config.xml
:::

:::BlockQuote
\<listen\_host>0.0.0.0\</listen\_host>
:::

Restart ClickHouse:

:::BlockQuote
sudo systemctl restart clickhouse-server
:::

:::BlockQuote
Ensure port **8123** is accessible (firewall / cloud security rules).
:::

**Port Conflict Note:**
&#x20;If CMS and ClickHouse run on the same server, change ClickHouse ports 9004–9006 to 9104–9106.
