|
2 | 2 | <!-- {{ ansible_managed }} -->
|
3 | 3 | <yandex>
|
4 | 4 | <logger>
|
| 5 | + <!-- Possible levels: https://github.com/pocoproject/poco/blob/develop/Foundation/include/Poco/Logger.h#L105 --> |
5 | 6 | <level>{{ clickhouse_logger.level }}</level>
|
6 | 7 | <log>{{ clickhouse_logger.log }}</log>
|
7 | 8 | <errorlog>{{ clickhouse_logger.errorlog }}</errorlog>
|
8 | 9 | <size>{{ clickhouse_logger.size }}</size>
|
9 | 10 | <count>{{ clickhouse_logger.count }}</count>
|
10 | 11 | </logger>
|
11 | 12 |
|
12 |
| - |
13 | 13 | <http_port>{{ clickhouse_http_port }}</http_port>
|
| 14 | + <tcp_port>{{ clickhouse_tcp_port }}</tcp_port> |
14 | 15 |
|
| 16 | + <!-- For HTTPS and SSL over native protocol. --> |
15 | 17 | <!--
|
16 |
| - <https_port>8443</https_port> |
| 18 | + <https_port>{{ clickhouse_https_port }}</https_port> |
| 19 | + <tcp_port_secure>{{ clickhouse_tcp_secure_port }}</tcp_port_secure> |
17 | 20 | -->
|
18 |
| - <!-- Used only with https_port. Full ssl options list: https://github.com/yandex/ClickHouse/blob/master/contrib/libpoco/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h#L71 --> |
| 21 | + |
| 22 | + <!-- Used with https_port and tcp_port_secure. Full ssl options list: https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h#L71 --> |
19 | 23 | <openSSL>
|
20 |
| - <server> |
| 24 | + <server> <!-- Used for https server AND secure tcp port --> |
21 | 25 | <!-- openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/clickhouse-server/server.key -out /etc/clickhouse-server/server.crt -->
|
22 | 26 | <certificateFile>/etc/clickhouse-server/server.crt</certificateFile>
|
23 | 27 | <privateKeyFile>/etc/clickhouse-server/server.key</privateKeyFile>
|
|
29 | 33 | <disableProtocols>sslv2,sslv3</disableProtocols>
|
30 | 34 | <preferServerCiphers>true</preferServerCiphers>
|
31 | 35 | </server>
|
32 |
| - <client> |
| 36 | + |
| 37 | + <client> <!-- Used for connecting to https dictionary source --> |
33 | 38 | <loadDefaultCAFile>true</loadDefaultCAFile>
|
34 | 39 | <cacheSessions>true</cacheSessions>
|
35 | 40 | <disableProtocols>sslv2,sslv3</disableProtocols>
|
|
47 | 52 | <http_server_default_response><![CDATA[<html ng-app="SMI2"><head><base href="http://ui.tabix.io/"></head><body><div ui-view="" class="content-ui"></div><script src="http://loader.tabix.io/master.js"></script></body></html>]]></http_server_default_response>
|
48 | 53 | -->
|
49 | 54 |
|
50 |
| - <tcp_port>{{ clickhouse_tcp_port }}</tcp_port> |
51 |
| - |
52 | 55 | <!-- Port for communication between replicas. Used for data exchange. -->
|
53 | 56 | <interserver_http_port>{{ clickhouse_interserver_http }}</interserver_http_port>
|
54 | 57 |
|
|
62 | 65 | {% if clickhouse_interserver_http_host is defined %}
|
63 | 66 | <interserver_http_host>{{ clickhouse_interserver_http_host }}</interserver_http_host>
|
64 | 67 | {% endif %}
|
| 68 | + |
65 | 69 | <!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
|
66 | 70 | <!-- <listen_host>::</listen_host> -->
|
| 71 | + <!-- Same for hosts with disabled ipv6: --> |
| 72 | + <!-- <listen_host>0.0.0.0</listen_host> --> |
67 | 73 | {% for host in clickhouse_listen_host %}
|
68 | 74 | <listen_host>{{ host }}</listen_host>
|
69 | 75 | {% endfor %}
|
|
97 | 103 |
|
98 | 104 | <!-- Path to temporary data for processing hard queries. -->
|
99 | 105 | <tmp_path>{{ clickhouse_path_tmp }}</tmp_path>
|
100 |
| - |
| 106 | + |
| 107 | + <!-- Directory with user provided files that are accessible by 'file' table function. --> |
101 | 108 | <user_files_path>{{ clickhouse_path_user_files }}</user_files_path>
|
| 109 | + |
102 | 110 | <!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
|
103 | 111 | <users_config>users.xml</users_config>
|
104 | 112 |
|
105 |
| - <!-- Default profile of settings.. --> |
| 113 | + <!-- Default profile of settings. --> |
106 | 114 | <default_profile>default</default_profile>
|
107 | 115 |
|
| 116 | + <!-- System profile of settings. This settings are used by internal processes (Buffer storage, Distibuted DDL worker and so on). --> |
| 117 | + <!-- <system_profile>default</system_profile> --> |
| 118 | + |
108 | 119 | <!-- Default database. -->
|
109 | 120 | <default_database>default</default_database>
|
110 | 121 |
|
|
127 | 138 | -->
|
128 | 139 | <!-- <umask>022</umask> -->
|
129 | 140 |
|
| 141 | + <!-- Perform mlockall after startup to lower first queries latency |
| 142 | + and to prevent clickhouse executable from being paged out under high IO load. |
| 143 | + Enabling this option is recommended but will lead to increased startup time for up to a few seconds. |
| 144 | + --> |
| 145 | + <mlock_executable>{{ clickhouse_mlock_status }}</mlock_executable> |
| 146 | + |
130 | 147 | <!-- Configuration of clusters that could be used in Distributed tables.
|
131 |
| - https://clickhouse.yandex/reference_en.html#Distributed |
| 148 | + https://clickhouse.yandex/docs/en/table_engines/distributed/ |
132 | 149 | -->
|
133 | 150 | <remote_servers incl="clickhouse_remote_servers" />
|
134 | 151 |
|
|
141 | 158 | <!-- ZooKeeper is used to store metadata about replicas, when using Replicated tables.
|
142 | 159 | Optional. If you don't use replicated tables, you could omit that.
|
143 | 160 |
|
144 |
| - See https://clickhouse.yandex/reference_en.html#Data%20replication |
| 161 | + See https://clickhouse.yandex/docs/en/table_engines/replication/ |
145 | 162 | -->
|
146 | 163 | <zookeeper incl="zookeeper-servers" optional="true" />
|
147 | 164 |
|
148 | 165 | <!-- Substitutions for parameters of replicated tables.
|
149 | 166 | Optional. If you don't use replicated tables, you could omit that.
|
150 | 167 |
|
151 |
| - See https://clickhouse.yandex/reference_en.html#Creating%20replicated%20tables |
| 168 | + See https://clickhouse.yandex/docs/en/table_engines/replication/#creating-replicated-tables |
152 | 169 | -->
|
153 | 170 | <macros incl="macros" optional="true" />
|
154 | 171 |
|
|
167 | 184 | <!--
|
168 | 185 | interval - send every X second
|
169 | 186 | root_path - prefix for keys
|
| 187 | + hostname_in_path - append hostname to root_path (default = true) |
170 | 188 | metrics - send data from table system.metrics
|
171 | 189 | events - send data from table system.events
|
172 | 190 | asynchronous_metrics - send data from table system.asynchronous_metrics
|
|
178 | 196 | <timeout>0.1</timeout>
|
179 | 197 | <interval>60</interval>
|
180 | 198 | <root_path>one_min</root_path>
|
| 199 | + <hostname_in_path>true</hostname_in_path> |
181 | 200 |
|
182 | 201 | <metrics>true</metrics>
|
183 | 202 | <events>true</events>
|
|
205 | 224 | -->
|
206 | 225 | <database>system</database>
|
207 | 226 | <table>query_log</table>
|
| 227 | + <!-- |
| 228 | + PARTITION BY expr https://clickhouse.yandex/docs/en/table_engines/custom_partitioning_key/ |
| 229 | + Example: |
| 230 | + event_date |
| 231 | + toMonday(event_date) |
| 232 | + toYYYYMM(event_date) |
| 233 | + toStartOfHour(event_time) |
| 234 | + --> |
208 | 235 | <partition_by>toYYYYMM(event_date)</partition_by>
|
209 | 236 | <!-- Interval of flushing data. -->
|
210 | 237 | <flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
211 | 238 | </query_log>
|
212 | 239 |
|
| 240 | + <!-- Query thread log. Has information about all threads participated in query execution. |
| 241 | + Used only for queries with setting log_query_threads = 1. --> |
| 242 | + <query_thread_log> |
| 243 | + <database>system</database> |
| 244 | + <table>query_thread_log</table> |
| 245 | + <partition_by>toYYYYMM(event_date)</partition_by> |
| 246 | + <flush_interval_milliseconds>7500</flush_interval_milliseconds> |
| 247 | + </query_thread_log> |
213 | 248 |
|
214 |
| - <!-- Uncomment if use part_log |
| 249 | + <!-- Uncomment if use part log. |
| 250 | + Part log contains information about all actions with parts in MergeTree tables (creation, deletion, merges, downloads). |
215 | 251 | <part_log>
|
216 | 252 | <database>system</database>
|
217 | 253 | <table>part_log</table>
|
218 |
| -
|
219 | 254 | <flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
220 | 255 | </part_log>
|
221 | 256 | -->
|
222 | 257 |
|
223 | 258 |
|
224 | 259 | <!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
|
225 |
| - See https://clickhouse.yandex/reference_en.html#Internal%20dictionaries |
| 260 | + See https://clickhouse.yandex/docs/en/dicts/internal_dicts/ |
226 | 261 | -->
|
227 | 262 |
|
228 | 263 | <!-- Path to file with region hierarchy. -->
|
|
233 | 268 |
|
234 | 269 |
|
235 | 270 | <!-- Configuration of external dictionaries. See:
|
236 |
| - https://clickhouse.yandex/reference_en.html#External%20Dictionaries |
| 271 | + https://clickhouse.yandex/docs/en/dicts/external_dicts/ |
237 | 272 | -->
|
238 | 273 | <dictionaries_config>*_dictionary.xml</dictionaries_config>
|
239 | 274 |
|
|
247 | 282 |
|
248 | 283 | <!- - Conditions. All must be satisfied. Some conditions may be omitted. - ->
|
249 | 284 | <min_part_size>10000000000</min_part_size> <!- - Min part size in bytes. - ->
|
250 |
| - <min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - -> |
| 285 | + <min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - -> |
251 | 286 |
|
252 | 287 | <!- - What compression method to use. - ->
|
253 |
| - <method>zstd</method> <!- - Keep in mind that zstd compression library is highly experimental. - -> |
| 288 | + <method>zstd</method> |
254 | 289 | </case>
|
255 | 290 | -->
|
256 | 291 | </compression>
|
257 | 292 |
|
258 |
| - <resharding> |
259 |
| - <task_queue_path>/clickhouse/task_queue</task_queue_path> |
260 |
| - </resharding> |
261 |
| - |
262 | 293 | <!-- Allow to execute distributed DDL queries (CREATE, DROP, ALTER, RENAME) on cluster.
|
263 | 294 | Works only if ZooKeeper is enabled. Comment it if such functionality isn't required. -->
|
264 | 295 | <distributed_ddl>
|
265 | 296 | <!-- Path in ZooKeeper to queue with DDL queries -->
|
266 | 297 | <path>/clickhouse/task_queue/ddl</path>
|
| 298 | + |
| 299 | + <!-- Settings from this profile will be used to execute DDL queries --> |
| 300 | + <!-- <profile>default</profile> --> |
267 | 301 | </distributed_ddl>
|
268 | 302 |
|
269 | 303 | <!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
|
|
276 | 310 | <!-- Protection from accidental DROP.
|
277 | 311 | If size of a MergeTree table is greater than max_table_size_to_drop (in bytes) than table could not be dropped with any DROP query.
|
278 | 312 | If you want do delete one table and don't want to restart clickhouse-server, you could create special file <clickhouse-path>/flags/force_drop_table and make DROP once.
|
279 |
| - By default max_table_size_to_drop is 50GB, max_table_size_to_drop=0 allows to DROP any tables. |
| 313 | + By default max_table_size_to_drop is 50GB; max_table_size_to_drop=0 allows to DROP any tables. |
| 314 | + The same for max_partition_size_to_drop. |
280 | 315 | Uncomment to disable protection.
|
281 | 316 | -->
|
282 | 317 | <!-- <max_table_size_to_drop>0</max_table_size_to_drop> -->
|
| 318 | + <!-- <max_partition_size_to_drop>0</max_partition_size_to_drop> --> |
283 | 319 |
|
284 | 320 | <!-- Example of parameters for GraphiteMergeTree table engine -->
|
285 | 321 | <graphite_rollup_example>
|
|
312 | 348 | </default>
|
313 | 349 | </graphite_rollup_example>
|
314 | 350 |
|
315 |
| - <format_schema_path>/var/lib/clickhouse/format_schemas/</format_schema_path> |
| 351 | + <!-- Directory in <clickhouse-path> containing schema files for various input formats. |
| 352 | + The directory will be created if it doesn't exist. |
| 353 | + --> |
| 354 | + <format_schema_path>{{ clickhouse_path_data }}/format_schemas/</format_schema_path> |
316 | 355 |
|
| 356 | + <!-- Uncomment to disable ClickHouse internal DNS caching. --> |
| 357 | + <!-- <disable_internal_dns_cache>1</disable_internal_dns_cache> --> |
317 | 358 | </yandex>
|
0 commit comments