From b84aad80c7b65fcff74ad356bac12aa93807e6b9 Mon Sep 17 00:00:00 2001 From: karencfv Date: Tue, 19 Nov 2024 17:11:58 +1300 Subject: [PATCH 1/2] Enable system.metric_log and system.asynchronous_metric_log tables --- clickhouse-admin/types/src/config.rs | 32 ++++++++++++++++++++++++++++ smf/clickhouse/config.xml | 32 ++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/clickhouse-admin/types/src/config.rs b/clickhouse-admin/types/src/config.rs index 27eb569b91..b51cf78216 100644 --- a/clickhouse-admin/types/src/config.rs +++ b/clickhouse-admin/types/src/config.rs @@ -132,6 +132,38 @@ impl ReplicaConfig { 10000 + + system + metric_log
+ + Engine = MergeTree ORDER BY event_time TTL event_date + INTERVAL 30 DAY + 7500 + 1000 + 1048576 + 8192 + 524288 + false +
+ + + system + asynchronous_metric_log
+ + Engine = MergeTree ORDER BY event_time TTL event_date + INTERVAL 30 DAY + 7500 + 1000 + 1048576 + 8192 + 524288 + false +
+ {temp_files_path} {user_files_path} default diff --git a/smf/clickhouse/config.xml b/smf/clickhouse/config.xml index 58ae5dcaf5..6b85f4f45a 100644 --- a/smf/clickhouse/config.xml +++ b/smf/clickhouse/config.xml @@ -13,6 +13,38 @@ 10000 + + system + metric_log
+ + Engine = MergeTree ORDER BY event_time TTL event_date + INTERVAL 30 DAY + 7500 + 1000 + 1048576 + 8192 + 524288 + false +
+ + + system + asynchronous_metric_log
+ + Engine = MergeTree ORDER BY event_time TTL event_date + INTERVAL 30 DAY + 7500 + 1000 + 1048576 + 8192 + 524288 + false +
+ true 9000 From 11c6e1d293de65f5b0bcf861ac6dd0bab13c04a6 Mon Sep 17 00:00:00 2001 From: karencfv Date: Tue, 19 Nov 2024 17:31:20 +1300 Subject: [PATCH 2/2] clean up --- clickhouse-admin/types/src/config.rs | 4 +-- .../types/testutils/replica-server-config.xml | 32 +++++++++++++++++++ smf/clickhouse/config.xml | 4 +-- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/clickhouse-admin/types/src/config.rs b/clickhouse-admin/types/src/config.rs index b51cf78216..120ff32312 100644 --- a/clickhouse-admin/types/src/config.rs +++ b/clickhouse-admin/types/src/config.rs @@ -135,7 +135,7 @@ impl ReplicaConfig { system metric_log
- @@ -151,7 +151,7 @@ impl ReplicaConfig { system asynchronous_metric_log
- diff --git a/clickhouse-admin/types/testutils/replica-server-config.xml b/clickhouse-admin/types/testutils/replica-server-config.xml index 3aeacd073d..8a0687e9af 100644 --- a/clickhouse-admin/types/testutils/replica-server-config.xml +++ b/clickhouse-admin/types/testutils/replica-server-config.xml @@ -49,6 +49,38 @@ 10000 + + system + metric_log
+ + Engine = MergeTree ORDER BY event_time TTL event_date + INTERVAL 30 DAY + 7500 + 1000 + 1048576 + 8192 + 524288 + false +
+ + + system + asynchronous_metric_log
+ + Engine = MergeTree ORDER BY event_time TTL event_date + INTERVAL 30 DAY + 7500 + 1000 + 1048576 + 8192 + 524288 + false +
+ ./data/tmp ./data/user_files default diff --git a/smf/clickhouse/config.xml b/smf/clickhouse/config.xml index 6b85f4f45a..352023300a 100644 --- a/smf/clickhouse/config.xml +++ b/smf/clickhouse/config.xml @@ -16,7 +16,7 @@ system metric_log
- @@ -32,7 +32,7 @@ system asynchronous_metric_log
-