CodeCommitsIssuesPull requestsActionsInsightsSecurity
7bc2c83b800f87624f5e7f3f6f57a8ee87bd2ee4

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

programs/server/config.xml

678lines · modecode

1<?xml version="1.0"?>
2<!--
3 NOTE: User and query level settings are set up in "users.xml" file.
4 If you have accidentially specified user-level settings here, server won't start.
5 You can either move the settings to the right place inside "users.xml" file
6 or add <skip_check_for_incorrect_settings>1</skip_check_for_incorrect_settings> here.
7-->
8<yandex>
9 <logger>
10 <!-- Possible levels: https://github.com/pocoproject/poco/blob/poco-1.9.4-release/Foundation/include/Poco/Logger.h#L105 -->
11 <level>trace</level>
12 <log>/var/log/clickhouse-server/clickhouse-server.log</log>
13 <errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
14 <size>1000M</size>
15 <count>10</count>
16 <!-- <console>1</console> --> <!-- Default behavior is autodetection (log to console if not daemon mode and is tty) -->
17
18 <!-- Per level overrides (legacy):
19
20 For example to suppress logging of the ConfigReloader you can use:
21 NOTE: levels.logger is reserved, see below.
22 -->
23 <!--
24 <levels>
25 <ConfigReloader>none</ConfigReloader>
26 </levels>
27 -->
28
29 <!-- Per level overrides:
30
31 For example to suppress logging of the RBAC for default user you can use:
32 (But please note that the logger name maybe changed from version to version, even after minor upgrade)
33 -->
34 <!--
35 <levels>
36 <logger>
37 <name>ContextAccess (default)</name>
38 <level>none</level>
39 </logger>
40 <logger>
41 <name>DatabaseOrdinary (test)</name>
42 <level>none</level>
43 </logger>
44 </levels>
45 -->
46 </logger>
47
48 <send_crash_reports>
49 <!-- Changing <enabled> to true allows sending crash reports to -->
50 <!-- the ClickHouse core developers team via Sentry https://sentry.io -->
51 <!-- Doing so at least in pre-production environments is highly appreciated -->
52 <enabled>false</enabled>
53 <!-- Change <anonymize> to true if you don't feel comfortable attaching the server hostname to the crash report -->
54 <anonymize>false</anonymize>
55 <!-- Default endpoint should be changed to different Sentry DSN only if you have -->
56 <!-- some in-house engineers or hired consultants who're going to debug ClickHouse issues for you -->
57 <endpoint>https://6f33034cfe684dd7a3ab9875e57b1c8d@o388870.ingest.sentry.io/5226277</endpoint>
58 </send_crash_reports>
59
60 <!--display_name>production</display_name--> <!-- It is the name that will be shown in the client -->
61 <http_port>8123</http_port>
62 <tcp_port>9000</tcp_port>
63 <mysql_port>9004</mysql_port>
64 <!-- For HTTPS and SSL over native protocol. -->
65 <!--
66 <https_port>8443</https_port>
67 <tcp_port_secure>9440</tcp_port_secure>
68 -->
69 <!-- 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 -->
70 <openSSL>
71 <server> <!-- Used for https server AND secure tcp port -->
72 <!-- 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 -->
73 <certificateFile>/etc/clickhouse-server/server.crt</certificateFile>
74 <privateKeyFile>/etc/clickhouse-server/server.key</privateKeyFile>
75 <!-- openssl dhparam -out /etc/clickhouse-server/dhparam.pem 4096 -->
76 <dhParamsFile>/etc/clickhouse-server/dhparam.pem</dhParamsFile>
77 <verificationMode>none</verificationMode>
78 <loadDefaultCAFile>true</loadDefaultCAFile>
79 <cacheSessions>true</cacheSessions>
80 <disableProtocols>sslv2,sslv3</disableProtocols>
81 <preferServerCiphers>true</preferServerCiphers>
82 </server>
83
84 <client> <!-- Used for connecting to https dictionary source and secured Zookeeper communication -->
85 <loadDefaultCAFile>true</loadDefaultCAFile>
86 <cacheSessions>true</cacheSessions>
87 <disableProtocols>sslv2,sslv3</disableProtocols>
88 <preferServerCiphers>true</preferServerCiphers>
89 <!-- Use for self-signed: <verificationMode>none</verificationMode> -->
90 <invalidCertificateHandler>
91 <!-- Use for self-signed: <name>AcceptCertificateHandler</name> -->
92 <name>RejectCertificateHandler</name>
93 </invalidCertificateHandler>
94 </client>
95 </openSSL>
96
97 <!-- Default root page on http[s] server. For example load UI from https://tabix.io/ when opening http://localhost:8123 -->
98 <!--
99 <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>
100 -->
101
102 <!-- Port for communication between replicas. Used for data exchange. -->
103 <interserver_http_port>9009</interserver_http_port>
104
105 <!-- Hostname that is used by other replicas to request this server.
106 If not specified, than it is determined analoguous to 'hostname -f' command.
107 This setting could be used to switch replication to another network interface.
108 -->
109 <!--
110 <interserver_http_host>example.yandex.ru</interserver_http_host>
111 -->
112
113 <!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
114 <!-- <listen_host>::</listen_host> -->
115 <!-- Same for hosts with disabled ipv6: -->
116 <!-- <listen_host>0.0.0.0</listen_host> -->
117
118 <!-- Default values - try listen localhost on ipv4 and ipv6: -->
119 <!--
120 <listen_host>::1</listen_host>
121 <listen_host>127.0.0.1</listen_host>
122 -->
123 <!-- Don't exit if ipv6 or ipv4 unavailable, but listen_host with this protocol specified -->
124 <!-- <listen_try>0</listen_try> -->
125
126 <!-- Allow listen on same address:port -->
127 <!-- <listen_reuse_port>0</listen_reuse_port> -->
128
129 <!-- <listen_backlog>64</listen_backlog> -->
130
131 <max_connections>4096</max_connections>
132 <keep_alive_timeout>3</keep_alive_timeout>
133
134 <!-- Maximum number of concurrent queries. -->
135 <max_concurrent_queries>100</max_concurrent_queries>
136
137 <!-- Maximum memory usage (resident set size) for server process.
138 Zero value or unset means default. Default is "max_server_memory_usage_to_ram_ratio" of available physical RAM.
139 If the value is larger than "max_server_memory_usage_to_ram_ratio" of available physical RAM, it will be cut down.
140
141 The constraint is checked on query execution time.
142 If a query tries to allocate memory and the current memory usage plus allocation is greater
143 than specified threshold, exception will be thrown.
144
145 It is not practical to set this constraint to small values like just a few gigabytes,
146 because memory allocator will keep this amount of memory in caches and the server will deny service of queries.
147 -->
148 <max_server_memory_usage>0</max_server_memory_usage>
149
150 <!-- Maximum number of threads in the Global thread pool.
151 This will default to a maximum of 10000 threads if not specified.
152 This setting will be useful in scenarios where there are a large number
153 of distributed queries that are running concurrently but are idling most
154 of the time, in which case a higher number of threads might be required.
155 -->
156
157 <max_thread_pool_size>10000</max_thread_pool_size>
158
159 <!-- On memory constrained environments you may have to set this to value larger than 1.
160 -->
161 <max_server_memory_usage_to_ram_ratio>0.9</max_server_memory_usage_to_ram_ratio>
162
163 <!-- Simple server-wide memory profiler. Collect a stack trace at every peak allocation step (in bytes).
164 Data will be stored in system.trace_log table with query_id = empty string.
165 Zero means disabled.
166 -->
167 <total_memory_profiler_step>4194304</total_memory_profiler_step>
168
169 <!-- Collect random allocations and deallocations and write them into system.trace_log with 'MemorySample' trace_type.
170 The probability is for every alloc/free regardless to the size of the allocation.
171 Note that sampling happens only when the amount of untracked memory exceeds the untracked memory limit,
172 which is 4 MiB by default but can be lowered if 'total_memory_profiler_step' is lowered.
173 You may want to set 'total_memory_profiler_step' to 1 for extra fine grained sampling.
174 -->
175 <total_memory_tracker_sample_probability>0</total_memory_tracker_sample_probability>
176
177 <!-- Set limit on number of open files (default: maximum). This setting makes sense on Mac OS X because getrlimit() fails to retrieve
178 correct maximum value. -->
179 <!-- <max_open_files>262144</max_open_files> -->
180
181 <!-- Size of cache of uncompressed blocks of data, used in tables of MergeTree family.
182 In bytes. Cache is single for server. Memory is allocated only on demand.
183 Cache is used when 'use_uncompressed_cache' user setting turned on (off by default).
184 Uncompressed cache is advantageous only for very short queries and in rare cases.
185 -->
186 <uncompressed_cache_size>8589934592</uncompressed_cache_size>
187
188 <!-- Approximate size of mark cache, used in tables of MergeTree family.
189 In bytes. Cache is single for server. Memory is allocated only on demand.
190 You should not lower this value.
191 -->
192 <mark_cache_size>5368709120</mark_cache_size>
193
194
195 <!-- Path to data directory, with trailing slash. -->
196 <path>/var/lib/clickhouse/</path>
197
198 <!-- Path to temporary data for processing hard queries. -->
199 <tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
200
201 <!-- Policy from the <storage_configuration> for the temporary files.
202 If not set <tmp_path> is used, otherwise <tmp_path> is ignored.
203
204 Notes:
205 - move_factor is ignored
206 - keep_free_space_bytes is ignored
207 - max_data_part_size_bytes is ignored
208 - you must have exactly one volume in that policy
209 -->
210 <!-- <tmp_policy>tmp</tmp_policy> -->
211
212 <!-- Directory with user provided files that are accessible by 'file' table function. -->
213 <user_files_path>/var/lib/clickhouse/user_files/</user_files_path>
214
215 <!-- Path to folder where users and roles created by SQL commands are stored. -->
216 <access_control_path>/var/lib/clickhouse/access/</access_control_path>
217
218 <!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
219 <users_config>users.xml</users_config>
220
221 <!-- Default profile of settings. -->
222 <default_profile>default</default_profile>
223
224 <!-- System profile of settings. This settings are used by internal processes (Buffer storage, Distibuted DDL worker and so on). -->
225 <!-- <system_profile>default</system_profile> -->
226
227 <!-- Default database. -->
228 <default_database>default</default_database>
229
230 <!-- Server time zone could be set here.
231
232 Time zone is used when converting between String and DateTime types,
233 when printing DateTime in text formats and parsing DateTime from text,
234 it is used in date and time related functions, if specific time zone was not passed as an argument.
235
236 Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
237 If not specified, system time zone at server startup is used.
238
239 Please note, that server could display time zone alias instead of specified name.
240 Example: W-SU is an alias for Europe/Moscow and Zulu is an alias for UTC.
241 -->
242 <!-- <timezone>Europe/Moscow</timezone> -->
243
244 <!-- You can specify umask here (see "man umask"). Server will apply it on startup.
245 Number is always parsed as octal. Default umask is 027 (other users cannot read logs, data files, etc; group can only read).
246 -->
247 <!-- <umask>022</umask> -->
248
249 <!-- Perform mlockall after startup to lower first queries latency
250 and to prevent clickhouse executable from being paged out under high IO load.
251 Enabling this option is recommended but will lead to increased startup time for up to a few seconds.
252 -->
253 <mlock_executable>true</mlock_executable>
254
255 <!-- Configuration of clusters that could be used in Distributed tables.
256 https://clickhouse.tech/docs/en/operations/table_engines/distributed/
257 -->
258 <remote_servers incl="clickhouse_remote_servers" >
259 <!-- Test only shard config for testing distributed storage -->
260 <test_shard_localhost>
261 <shard>
262 <!-- Optional. Whether to write data to just one of the replicas. Default: false (write data to all replicas). -->
263 <!-- <internal_replication>false</internal_replication> -->
264 <!-- Optional. Shard weight when writing data. Default: 1. -->
265 <!-- <weight>1</weight> -->
266 <replica>
267 <host>localhost</host>
268 <port>9000</port>
269 <!-- Optional. Priority of the replica for load_balancing. Default: 1 (less value has more priority). -->
270 <!-- <priority>1</priority> -->
271 </replica>
272 </shard>
273 </test_shard_localhost>
274 <test_cluster_two_shards_localhost>
275 <shard>
276 <replica>
277 <host>localhost</host>
278 <port>9000</port>
279 </replica>
280 </shard>
281 <shard>
282 <replica>
283 <host>localhost</host>
284 <port>9000</port>
285 </replica>
286 </shard>
287 </test_cluster_two_shards_localhost>
288 <test_cluster_two_shards>
289 <shard>
290 <replica>
291 <host>127.0.0.1</host>
292 <port>9000</port>
293 </replica>
294 </shard>
295 <shard>
296 <replica>
297 <host>127.0.0.2</host>
298 <port>9000</port>
299 </replica>
300 </shard>
301 </test_cluster_two_shards>
302 <test_shard_localhost_secure>
303 <shard>
304 <replica>
305 <host>localhost</host>
306 <port>9440</port>
307 <secure>1</secure>
308 </replica>
309 </shard>
310 </test_shard_localhost_secure>
311 <test_unavailable_shard>
312 <shard>
313 <replica>
314 <host>localhost</host>
315 <port>9000</port>
316 </replica>
317 </shard>
318 <shard>
319 <replica>
320 <host>localhost</host>
321 <port>1</port>
322 </replica>
323 </shard>
324 </test_unavailable_shard>
325 </remote_servers>
326
327 <!-- The list of hosts allowed to use in URL-related storage engines and table functions.
328 If this section is not present in configuration, all hosts are allowed.
329 -->
330 <remote_url_allow_hosts>
331 <!-- Host should be specified exactly as in URL. The name is checked before DNS resolution.
332 Example: "yandex.ru", "yandex.ru." and "www.yandex.ru" are different hosts.
333 If port is explicitly specified in URL, the host:port is checked as a whole.
334 If host specified here without port, any port with this host allowed.
335 "yandex.ru" -> "yandex.ru:443", "yandex.ru:80" etc. is allowed, but "yandex.ru:80" -> only "yandex.ru:80" is allowed.
336 If the host is specified as IP address, it is checked as specified in URL. Example: "[2a02:6b8:a::a]".
337 If there are redirects and support for redirects is enabled, every redirect (the Location field) is checked.
338 -->
339
340 <!-- Regular expression can be specified. RE2 engine is used for regexps.
341 Regexps are not aligned: don't forget to add ^ and $. Also don't forget to escape dot (.) metacharacter
342 (forgetting to do so is a common source of error).
343 -->
344 </remote_url_allow_hosts>
345
346 <!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
347 By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
348 Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
349 -->
350
351 <!-- ZooKeeper is used to store metadata about replicas, when using Replicated tables.
352 Optional. If you don't use replicated tables, you could omit that.
353
354 See https://clickhouse.yandex/docs/en/table_engines/replication/
355 -->
356
357 <zookeeper incl="zookeeper-servers" optional="true" />
358
359 <!-- Substitutions for parameters of replicated tables.
360 Optional. If you don't use replicated tables, you could omit that.
361
362 See https://clickhouse.yandex/docs/en/table_engines/replication/#creating-replicated-tables
363 -->
364 <macros incl="macros" optional="true" />
365
366
367 <!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
368 <builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
369
370
371 <!-- Maximum session timeout, in seconds. Default: 3600. -->
372 <max_session_timeout>3600</max_session_timeout>
373
374 <!-- Default session timeout, in seconds. Default: 60. -->
375 <default_session_timeout>60</default_session_timeout>
376
377 <!-- Sending data to Graphite for monitoring. Several sections can be defined. -->
378 <!--
379 interval - send every X second
380 root_path - prefix for keys
381 hostname_in_path - append hostname to root_path (default = true)
382 metrics - send data from table system.metrics
383 events - send data from table system.events
384 asynchronous_metrics - send data from table system.asynchronous_metrics
385 -->
386 <!--
387 <graphite>
388 <host>localhost</host>
389 <port>42000</port>
390 <timeout>0.1</timeout>
391 <interval>60</interval>
392 <root_path>one_min</root_path>
393 <hostname_in_path>true</hostname_in_path>
394
395 <metrics>true</metrics>
396 <events>true</events>
397 <events_cumulative>false</events_cumulative>
398 <asynchronous_metrics>true</asynchronous_metrics>
399 </graphite>
400 <graphite>
401 <host>localhost</host>
402 <port>42000</port>
403 <timeout>0.1</timeout>
404 <interval>1</interval>
405 <root_path>one_sec</root_path>
406
407 <metrics>true</metrics>
408 <events>true</events>
409 <events_cumulative>false</events_cumulative>
410 <asynchronous_metrics>false</asynchronous_metrics>
411 </graphite>
412 -->
413
414 <!-- Serve endpoint fot Prometheus monitoring. -->
415 <!--
416 endpoint - mertics path (relative to root, statring with "/")
417 port - port to setup server. If not defined or 0 than http_port used
418 metrics - send data from table system.metrics
419 events - send data from table system.events
420 asynchronous_metrics - send data from table system.asynchronous_metrics
421 status_info - send data from different component from CH, ex: Dictionaries status
422 -->
423 <!--
424 <prometheus>
425 <endpoint>/metrics</endpoint>
426 <port>9363</port>
427
428 <metrics>true</metrics>
429 <events>true</events>
430 <asynchronous_metrics>true</asynchronous_metrics>
431 <status_info>true</status_info>
432 </prometheus>
433 -->
434
435 <!-- Query log. Used only for queries with setting log_queries = 1. -->
436 <query_log>
437 <!-- What table to insert data. If table is not exist, it will be created.
438 When query log structure is changed after system update,
439 then old table will be renamed and new table will be created automatically.
440 -->
441 <database>system</database>
442 <table>query_log</table>
443 <!--
444 PARTITION BY expr https://clickhouse.yandex/docs/en/table_engines/custom_partitioning_key/
445 Example:
446 event_date
447 toMonday(event_date)
448 toYYYYMM(event_date)
449 toStartOfHour(event_time)
450 -->
451 <partition_by>toYYYYMM(event_date)</partition_by>
452
453 <!-- Instead of partition_by, you can provide full engine expression (starting with ENGINE = ) with parameters,
454 Example: <engine>ENGINE = MergeTree PARTITION BY toYYYYMM(event_date) ORDER BY (event_date, event_time) SETTINGS index_granularity = 1024</engine>
455 -->
456
457 <!-- Interval of flushing data. -->
458 <flush_interval_milliseconds>7500</flush_interval_milliseconds>
459 </query_log>
460
461 <!-- Trace log. Stores stack traces collected by query profilers.
462 See query_profiler_real_time_period_ns and query_profiler_cpu_time_period_ns settings. -->
463 <trace_log>
464 <database>system</database>
465 <table>trace_log</table>
466
467 <partition_by>toYYYYMM(event_date)</partition_by>
468 <flush_interval_milliseconds>7500</flush_interval_milliseconds>
469 </trace_log>
470
471 <!-- Query thread log. Has information about all threads participated in query execution.
472 Used only for queries with setting log_query_threads = 1. -->
473 <query_thread_log>
474 <database>system</database>
475 <table>query_thread_log</table>
476 <partition_by>toYYYYMM(event_date)</partition_by>
477 <flush_interval_milliseconds>7500</flush_interval_milliseconds>
478 </query_thread_log>
479
480 <!-- Uncomment if use part log.
481 Part log contains information about all actions with parts in MergeTree tables (creation, deletion, merges, downloads).
482 <part_log>
483 <database>system</database>
484 <table>part_log</table>
485 <flush_interval_milliseconds>7500</flush_interval_milliseconds>
486 </part_log>
487 -->
488
489 <!-- Uncomment to write text log into table.
490 Text log contains all information from usual server log but stores it in structured and efficient way.
491 The level of the messages that goes to the table can be limited (<level>), if not specified all messages will go to the table.
492 <text_log>
493 <database>system</database>
494 <table>text_log</table>
495 <flush_interval_milliseconds>7500</flush_interval_milliseconds>
496 <level></level>
497 </text_log>
498 -->
499
500 <!-- Metric log contains rows with current values of ProfileEvents, CurrentMetrics collected with "collect_interval_milliseconds" interval. -->
501 <metric_log>
502 <database>system</database>
503 <table>metric_log</table>
504 <flush_interval_milliseconds>7500</flush_interval_milliseconds>
505 <collect_interval_milliseconds>1000</collect_interval_milliseconds>
506 </metric_log>
507
508 <!--
509 Asynchronous metric log contains values of metrics from
510 system.asynchronous_metrics.
511 -->
512 <asynchronous_metric_log>
513 <database>system</database>
514 <table>asynchronous_metric_log</table>
515 <!--
516 Asynchronous metrics are updated once a minute, so there is
517 no need to flush more often.
518 -->
519 <flush_interval_milliseconds>60000</flush_interval_milliseconds>
520 </asynchronous_metric_log>
521
522 <!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
523 See https://clickhouse.yandex/docs/en/dicts/internal_dicts/
524 -->
525
526 <!-- Path to file with region hierarchy. -->
527 <!-- <path_to_regions_hierarchy_file>/opt/geo/regions_hierarchy.txt</path_to_regions_hierarchy_file> -->
528
529 <!-- Path to directory with files containing names of regions -->
530 <!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> -->
531
532
533 <!-- Configuration of external dictionaries. See:
534 https://clickhouse.yandex/docs/en/dicts/external_dicts/
535 -->
536 <dictionaries_config>*_dictionary.xml</dictionaries_config>
537
538 <!-- Uncomment if you want data to be compressed 30-100% better.
539 Don't do that if you just started using ClickHouse.
540 -->
541 <compression incl="clickhouse_compression">
542 <!--
543 <!- - Set of variants. Checked in order. Last matching case wins. If nothing matches, lz4 will be used. - ->
544 <case>
545
546 <!- - Conditions. All must be satisfied. Some conditions may be omitted. - ->
547 <min_part_size>10000000000</min_part_size> <!- - Min part size in bytes. - ->
548 <min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - ->
549
550 <!- - What compression method to use. - ->
551 <method>zstd</method>
552 </case>
553 -->
554 </compression>
555
556 <!-- Allow to execute distributed DDL queries (CREATE, DROP, ALTER, RENAME) on cluster.
557 Works only if ZooKeeper is enabled. Comment it if such functionality isn't required. -->
558 <distributed_ddl>
559 <!-- Path in ZooKeeper to queue with DDL queries -->
560 <path>/clickhouse/task_queue/ddl</path>
561
562 <!-- Settings from this profile will be used to execute DDL queries -->
563 <!-- <profile>default</profile> -->
564 </distributed_ddl>
565
566 <!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
567 <!--
568 <merge_tree>
569 <max_suspicious_broken_parts>5</max_suspicious_broken_parts>
570 </merge_tree>
571 -->
572
573 <!-- Protection from accidental DROP.
574 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.
575 If you want do delete one table and don't want to change clickhouse-server config, you could create special file <clickhouse-path>/flags/force_drop_table and make DROP once.
576 By default max_table_size_to_drop is 50GB; max_table_size_to_drop=0 allows to DROP any tables.
577 The same for max_partition_size_to_drop.
578 Uncomment to disable protection.
579 -->
580 <!-- <max_table_size_to_drop>0</max_table_size_to_drop> -->
581 <!-- <max_partition_size_to_drop>0</max_partition_size_to_drop> -->
582
583 <!-- Example of parameters for GraphiteMergeTree table engine -->
584 <graphite_rollup_example>
585 <pattern>
586 <regexp>click_cost</regexp>
587 <function>any</function>
588 <retention>
589 <age>0</age>
590 <precision>3600</precision>
591 </retention>
592 <retention>
593 <age>86400</age>
594 <precision>60</precision>
595 </retention>
596 </pattern>
597 <default>
598 <function>max</function>
599 <retention>
600 <age>0</age>
601 <precision>60</precision>
602 </retention>
603 <retention>
604 <age>3600</age>
605 <precision>300</precision>
606 </retention>
607 <retention>
608 <age>86400</age>
609 <precision>3600</precision>
610 </retention>
611 </default>
612 </graphite_rollup_example>
613
614 <!-- Directory in <clickhouse-path> containing schema files for various input formats.
615 The directory will be created if it doesn't exist.
616 -->
617 <format_schema_path>/var/lib/clickhouse/format_schemas/</format_schema_path>
618
619 <!-- Uncomment to use query masking rules.
620 name - name for the rule (optional)
621 regexp - RE2 compatible regular expression (mandatory)
622 replace - substitution string for sensitive data (optional, by default - six asterisks)
623 <query_masking_rules>
624 <rule>
625 <name>hide SSN</name>
626 <regexp>\b\d{3}-\d{2}-\d{4}\b</regexp>
627 <replace>000-00-0000</replace>
628 </rule>
629 </query_masking_rules>
630 -->
631
632 <!-- Uncomment to use custom http handlers.
633 rules are checked from top to bottom, first match runs the handler
634 url - to match request URL, you can use 'regex:' prefix to use regex match(optional)
635 methods - to match request method, you can use commas to separate multiple method matches(optional)
636 headers - to match request headers, match each child element(child element name is header name), you can use 'regex:' prefix to use regex match(optional)
637 handler is request handler
638 type - supported types: static, dynamic_query_handler, predefined_query_handler
639 query - use with predefined_query_handler type, executes query when the handler is called
640 query_param_name - use with dynamic_query_handler type, extracts and executes the value corresponding to the <query_param_name> value in HTTP request params
641 status - use with static type, response status code
642 content_type - use with static type, response content-type
643 response_content - use with static type, Response content sent to client, when using the prefix 'file://' or 'config://', find the content from the file or configuration send to client.
644
645 <http_handlers>
646 <rule>
647 <url>/</url>
648 <methods>POST,GET</methods>
649 <headers><pragma>no-cache</pragma></headers>
650 <handler>
651 <type>dynamic_query_handler</type>
652 <query_param_name>query</query_param_name>
653 </handler>
654 </rule>
655
656 <rule>
657 <url>/predefined_query</url>
658 <methods>POST,GET</methods>
659 <handler>
660 <type>predefined_query_handler</type>
661 <query>SELECT * FROM system.settings</query>
662 </handler>
663 </rule>
664
665 <rule>
666 <handler>
667 <type>static</type>
668 <status>200</status>
669 <content_type>text/plain; charset=UTF-8</content_type>
670 <response_content>config://http_server_default_response</response_content>
671 </handler>
672 </rule>
673 </http_handlers>
674 -->
675
676 <!-- Uncomment to disable ClickHouse internal DNS caching. -->
677 <!-- <disable_internal_dns_cache>1</disable_internal_dns_cache> -->
678</yandex>