mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
feat: add system log retention configuration for ClickHouse with TTL settings
This commit is contained in:
@@ -188,6 +188,53 @@ clickhouse:
|
||||
<postgresql_port>9005</postgresql_port>
|
||||
<interserver_http_port>9009</interserver_http_port>
|
||||
<listen_host>::</listen_host>
|
||||
|
||||
<!-- System log retention: 6 hour TTL to prevent unbounded disk growth -->
|
||||
<query_log>
|
||||
<database>system</database>
|
||||
<table>query_log</table>
|
||||
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||
<ttl>event_date + INTERVAL 6 HOUR DELETE</ttl>
|
||||
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||
</query_log>
|
||||
<trace_log>
|
||||
<database>system</database>
|
||||
<table>trace_log</table>
|
||||
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||
<ttl>event_date + INTERVAL 6 HOUR DELETE</ttl>
|
||||
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||
</trace_log>
|
||||
<text_log>
|
||||
<database>system</database>
|
||||
<table>text_log</table>
|
||||
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||
<ttl>event_date + INTERVAL 6 HOUR DELETE</ttl>
|
||||
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||
</text_log>
|
||||
<part_log>
|
||||
<database>system</database>
|
||||
<table>part_log</table>
|
||||
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||
<ttl>event_date + INTERVAL 6 HOUR DELETE</ttl>
|
||||
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||
</part_log>
|
||||
<metric_log>
|
||||
<database>system</database>
|
||||
<table>metric_log</table>
|
||||
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||
<ttl>event_date + INTERVAL 6 HOUR DELETE</ttl>
|
||||
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||
</metric_log>
|
||||
<asynchronous_metric_log>
|
||||
<database>system</database>
|
||||
<table>asynchronous_metric_log</table>
|
||||
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||
<ttl>event_date + INTERVAL 6 HOUR DELETE</ttl>
|
||||
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||
</asynchronous_metric_log>
|
||||
<!-- Disable processors_profile_log entirely — it was 536 GiB and is not needed -->
|
||||
<processors_profile_log remove="1" />
|
||||
|
||||
<users>
|
||||
<${CLICKHOUSE_USER}>
|
||||
<password>${CLICKHOUSE_PASSWORD}</password>
|
||||
|
||||
Reference in New Issue
Block a user