clickhouse 日志采集

This commit is contained in:
ryan
2026-06-09 10:01:03 +08:00
parent b41457553d
commit 61bc569bd8
14 changed files with 2102 additions and 403 deletions
@@ -0,0 +1,21 @@
CREATE DATABASE IF NOT EXISTS wavelet;
USE wavelet;
CREATE TABLE IF NOT EXISTS user_access_logs
(
id UInt64,
user_id UInt64,
path String,
method String,
ip String,
user_agent String,
headers String,
status Int32,
latency Int64,
created_at DateTime
)
ENGINE = MergeTree()
PARTITION BY toYYYYMM(created_at)
ORDER BY (created_at, ip, user_id)
SETTINGS index_granularity = 8192;