|
| 1 | +<?xml version="1.0"?> |
| 2 | +<clickhouse> |
| 3 | + <user_directories> |
| 4 | + <users_xml> |
| 5 | + <path>/etc/clickhouse-server/users.xml</path> |
| 6 | + </users_xml> |
| 7 | + </user_directories> |
| 8 | + |
| 9 | + <logger> |
| 10 | + <level>information</level> |
| 11 | + <console>true</console> |
| 12 | + <log remove="remove"/> |
| 13 | + <errorlog remove="remove"/> |
| 14 | + </logger> |
| 15 | + |
| 16 | + <listen_host>0.0.0.0</listen_host> |
| 17 | + <http_port>{{ .Values.clickhouse.port }}</http_port> |
| 18 | + <tcp_port>{{ .Values.clickhouse.nativePort }}</tcp_port> |
| 19 | + |
| 20 | + <max_connections>4096</max_connections> |
| 21 | + <keep_alive_timeout>64</keep_alive_timeout> |
| 22 | + <max_concurrent_queries>100</max_concurrent_queries> |
| 23 | + <uncompressed_cache_size>8589934592</uncompressed_cache_size> |
| 24 | + <mark_cache_size>5368709120</mark_cache_size> |
| 25 | + |
| 26 | + <path>/var/lib/clickhouse/</path> |
| 27 | + <tmp_path>/var/lib/clickhouse/tmp/</tmp_path> |
| 28 | + <user_files_path>/var/lib/clickhouse/user_files/</user_files_path> |
| 29 | + |
| 30 | + <users_config>users.xml</users_config> |
| 31 | + <default_profile>default</default_profile> |
| 32 | + <default_database>default</default_database> |
| 33 | + <timezone>UTC</timezone> |
| 34 | + <mlock_executable>false</mlock_executable> |
| 35 | + |
| 36 | + <!-- Graceful shutdown settings --> |
| 37 | + <shutdown_wait_unfinished>60</shutdown_wait_unfinished> |
| 38 | + |
| 39 | + {{- if .Values.clickhouse.prometheus.enabled }} |
| 40 | + <!-- Prometheus exporter --> |
| 41 | + <prometheus> |
| 42 | + <endpoint>{{ .Values.clickhouse.prometheus.endpoint }}</endpoint> |
| 43 | + <port>{{ .Values.clickhouse.prometheus.port }}</port> |
| 44 | + <metrics>true</metrics> |
| 45 | + <events>true</events> |
| 46 | + <asynchronous_metrics>true</asynchronous_metrics> |
| 47 | + <errors>true</errors> |
| 48 | + </prometheus> |
| 49 | + {{- end }} |
| 50 | + |
| 51 | + <!-- Query log. Used only for queries with setting log_queries = 1. --> |
| 52 | + <query_log> |
| 53 | + <database>system</database> |
| 54 | + <table>query_log</table> |
| 55 | + <flush_interval_milliseconds>7500</flush_interval_milliseconds> |
| 56 | + </query_log> |
| 57 | + |
| 58 | + <!-- Metric log contains rows with current values of ProfileEvents, CurrentMetrics collected with "collect_interval_milliseconds" interval. --> |
| 59 | + <metric_log> |
| 60 | + <database>system</database> |
| 61 | + <table>metric_log</table> |
| 62 | + <flush_interval_milliseconds>7500</flush_interval_milliseconds> |
| 63 | + <collect_interval_milliseconds>1000</collect_interval_milliseconds> |
| 64 | + </metric_log> |
| 65 | + |
| 66 | + <!-- |
| 67 | + Asynchronous metric log contains values of metrics from |
| 68 | + system.asynchronous_metrics. |
| 69 | + --> |
| 70 | + <asynchronous_metric_log> |
| 71 | + <database>system</database> |
| 72 | + <table>asynchronous_metric_log</table> |
| 73 | + <!-- |
| 74 | + Asynchronous metrics are updated once a minute, so there is |
| 75 | + no need to flush more often. |
| 76 | + --> |
| 77 | + <flush_interval_milliseconds>7000</flush_interval_milliseconds> |
| 78 | + </asynchronous_metric_log> |
| 79 | + |
| 80 | + <!-- |
| 81 | + OpenTelemetry log contains OpenTelemetry trace spans. |
| 82 | + --> |
| 83 | + <opentelemetry_span_log> |
| 84 | + <!-- |
| 85 | + The default table creation code is insufficient, this <engine> spec |
| 86 | + is a workaround. There is no 'event_time' for this log, but two times, |
| 87 | + start and finish. It is sorted by finish time, to avoid inserting |
| 88 | + data too far away in the past (probably we can sometimes insert a span |
| 89 | + that is seconds earlier than the last span in the table, due to a race |
| 90 | + between several spans inserted in parallel). This gives the spans a |
| 91 | + global order that we can use to e.g. retry insertion into some external |
| 92 | + system. |
| 93 | + --> |
| 94 | + <engine> |
| 95 | + engine MergeTree |
| 96 | + partition by toYYYYMM(finish_date) |
| 97 | + order by (finish_date, finish_time_us, trace_id) |
| 98 | + </engine> |
| 99 | + <database>system</database> |
| 100 | + <table>opentelemetry_span_log</table> |
| 101 | + <flush_interval_milliseconds>7500</flush_interval_milliseconds> |
| 102 | + </opentelemetry_span_log> |
| 103 | + |
| 104 | + |
| 105 | + <!-- Crash log. Stores stack traces for fatal errors. |
| 106 | + This table is normally empty. --> |
| 107 | + <crash_log> |
| 108 | + <database>system</database> |
| 109 | + <table>crash_log</table> |
| 110 | + |
| 111 | + <partition_by /> |
| 112 | + <flush_interval_milliseconds>1000</flush_interval_milliseconds> |
| 113 | + </crash_log> |
| 114 | + |
| 115 | + <!-- Profiling on Processors level. --> |
| 116 | + <processors_profile_log> |
| 117 | + <database>system</database> |
| 118 | + <table>processors_profile_log</table> |
| 119 | + |
| 120 | + <partition_by>toYYYYMM(event_date)</partition_by> |
| 121 | + <flush_interval_milliseconds>7500</flush_interval_milliseconds> |
| 122 | + </processors_profile_log> |
| 123 | + |
| 124 | + <!-- Uncomment if use part log. |
| 125 | + Part log contains information about all actions with parts in MergeTree tables (creation, deletion, merges, downloads).--> |
| 126 | + <part_log> |
| 127 | + <database>system</database> |
| 128 | + <table>part_log</table> |
| 129 | + <partition_by>toYYYYMM(event_date)</partition_by> |
| 130 | + <flush_interval_milliseconds>7500</flush_interval_milliseconds> |
| 131 | + </part_log> |
| 132 | + |
| 133 | + <!-- Trace log. Stores stack traces collected by query profilers. |
| 134 | + See query_profiler_real_time_period_ns and query_profiler_cpu_time_period_ns settings. --> |
| 135 | + <trace_log> |
| 136 | + <database>system</database> |
| 137 | + <table>trace_log</table> |
| 138 | + |
| 139 | + <partition_by>toYYYYMM(event_date)</partition_by> |
| 140 | + <flush_interval_milliseconds>7500</flush_interval_milliseconds> |
| 141 | + </trace_log> |
| 142 | + |
| 143 | + <!-- Query thread log. Has information about all threads participated in query execution. |
| 144 | + Used only for queries with setting log_query_threads = 1. --> |
| 145 | + <query_thread_log> |
| 146 | + <database>system</database> |
| 147 | + <table>query_thread_log</table> |
| 148 | + <partition_by>toYYYYMM(event_date)</partition_by> |
| 149 | + <flush_interval_milliseconds>7500</flush_interval_milliseconds> |
| 150 | + </query_thread_log> |
| 151 | + |
| 152 | + <!-- Query views log. Has information about all dependent views associated with a query. |
| 153 | + Used only for queries with setting log_query_views = 1. --> |
| 154 | + <query_views_log> |
| 155 | + <database>system</database> |
| 156 | + <table>query_views_log</table> |
| 157 | + <partition_by>toYYYYMM(event_date)</partition_by> |
| 158 | + <flush_interval_milliseconds>7500</flush_interval_milliseconds> |
| 159 | + </query_views_log> |
| 160 | + |
| 161 | + <distributed_ddl> |
| 162 | + <path>/clickhouse/task_queue/ddl</path> |
| 163 | + </distributed_ddl> |
| 164 | + |
| 165 | + <format_schema_path>/var/lib/clickhouse/format_schemas/</format_schema_path> |
| 166 | +</clickhouse> |
0 commit comments