Skip to content

Commit

Permalink
feat: 为clickhouse日志表增加过期时间;为default用户设置默认密码
Browse files Browse the repository at this point in the history
  • Loading branch information
suyar committed Nov 8, 2024
1 parent e295f73 commit 67a98a2
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 3 deletions.
76 changes: 74 additions & 2 deletions config/clickhouse/config.d/docker_related_config.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,82 @@
<clickhouse>
<!-- Listen wildcard address to allow accepting connections from other containers and host network. -->
<!-- <listen_host>::</listen_host> -->
<listen_host>0.0.0.0</listen_host>
<listen_try>1</listen_try>

<logger>
<level>warning</level>
<size>10M</size>
<count>10</count>
</logger>

<timezone>Asia/Shanghai</timezone>

<query_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</query_log>

<trace_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</trace_log>

<query_thread_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</query_thread_log>

<query_views_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</query_views_log>

<part_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</part_log>

<text_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
<level>warning</level>
</text_log>

<metric_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</metric_log>

<error_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</error_log>

<asynchronous_metric_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</asynchronous_metric_log>

<opentelemetry_span_log>
<engine>
engine MergeTree
partition by toYYYYMM(finish_date)
order by (finish_date, finish_time_us, trace_id)
ttl event_date + INTERVAL 7 DAY DELETE
</engine>
</opentelemetry_span_log>

<crash_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</crash_log>

<processors_profile_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</processors_profile_log>

<asynchronous_insert_log>
<ttl>event_date + INTERVAL 3 DAY DELETE</ttl>
</asynchronous_insert_log>

<backup_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</backup_log>

<s3queue_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</s3queue_log>

<blob_storage_log>
<ttl>event_date + INTERVAL 7 DAY DELETE</ttl>
</blob_storage_log>
</clickhouse>
3 changes: 2 additions & 1 deletion config/clickhouse/users.d/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*
!.gitignore
!.gitignore
!users.xml
7 changes: 7 additions & 0 deletions config/clickhouse/users.d/users.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<clickhouse>
<users>
<default>
<password>123456</password>
</default>
</users>
</clickhouse>

0 comments on commit 67a98a2

Please sign in to comment.