mirror of
https://github.com/plausible/hosting.git
synced 2025-01-15 06:24:30 -06:00
restore clickhouse config
This commit is contained in:
parent
ff3b57066f
commit
591db4a8c6
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
*
|
*
|
||||||
!compose.yml
|
!compose.yml
|
||||||
!clickhouse
|
!clickhouse/
|
||||||
|
!clickhouse/**
|
||||||
!README.md
|
!README.md
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
4
clickhouse/ipv4.xml
Normal file
4
clickhouse/ipv4.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<clickhouse>
|
||||||
|
<!-- Fixes "Listen [::]:9000 failed: Address family for hostname not supported". -->
|
||||||
|
<listen_host>0.0.0.0</listen_host>
|
||||||
|
</clickhouse>
|
43
clickhouse/logs.xml
Normal file
43
clickhouse/logs.xml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<clickhouse>
|
||||||
|
<logger>
|
||||||
|
<level>warning</level>
|
||||||
|
<console>true</console>
|
||||||
|
</logger>
|
||||||
|
|
||||||
|
<query_log replace="1">
|
||||||
|
<database>system</database>
|
||||||
|
<table>query_log</table>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
<engine>
|
||||||
|
ENGINE = MergeTree
|
||||||
|
PARTITION BY event_date
|
||||||
|
ORDER BY (event_time)
|
||||||
|
TTL event_date + interval 30 day
|
||||||
|
SETTINGS ttl_only_drop_parts=1
|
||||||
|
</engine>
|
||||||
|
</query_log>
|
||||||
|
|
||||||
|
<metric_log>
|
||||||
|
<partition_by>event_date</partition_by>
|
||||||
|
<ttl>event_date + INTERVAL 30 DAY DELETE</ttl>
|
||||||
|
</metric_log>
|
||||||
|
|
||||||
|
<asynchronous_metric_log>
|
||||||
|
<partition_by>event_date</partition_by>
|
||||||
|
<ttl>event_date + INTERVAL 30 DAY DELETE</ttl>
|
||||||
|
</asynchronous_metric_log>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Avoid the warning: "Listen [::]:9009 failed: Address family for hostname not supported".
|
||||||
|
If Docker has IPv6 disabled, bind ClickHouse to IPv4 to prevent this issue.
|
||||||
|
Add this to the configuration to ensure it listens on all IPv4 interfaces:
|
||||||
|
<listen_host>0.0.0.0</listen_host>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Stop unnecessary logging -->
|
||||||
|
<query_thread_log remove="remove" />
|
||||||
|
<text_log remove="remove" />
|
||||||
|
<trace_log remove="remove" />
|
||||||
|
<session_log remove="remove" />
|
||||||
|
<part_log remove="remove" />
|
||||||
|
</clickhouse>
|
Loading…
Reference in New Issue
Block a user