Update config

This commit is contained in:
hughshen
2020-07-16 11:13:32 +08:00
parent aa79860686
commit b98f94a294
4 changed files with 1668 additions and 1116 deletions
+417 -279
View File
@@ -1,279 +1,417 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<yandex> <!--
<logger> NOTE: User and query level settings are set up in "users.xml" file.
<level>trace</level> -->
<log>/var/log/clickhouse-server/clickhouse-server.log</log> <yandex>
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog> <logger>
<size>1000M</size> <!-- Possible levels: https://github.com/pocoproject/poco/blob/develop/Foundation/include/Poco/Logger.h#L105 -->
<count>10</count> <level>trace</level>
</logger> <log>/var/log/clickhouse-server/clickhouse-server.log</log>
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
<http_port>8123</http_port> <size>1000M</size>
<count>10</count>
<!-- <!-- <console>1</console> --> <!-- Default behavior is autodetection (log to console if not daemon mode and is tty) -->
<https_port>8443</https_port> </logger>
--> <!--display_name>production</display_name--> <!-- It is the name that will be shown in the client -->
<!-- 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 --> <http_port>8123</http_port>
<openSSL> <tcp_port>9000</tcp_port>
<server>
<!-- openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout server.key -out server.crt --> <!-- For HTTPS and SSL over native protocol. -->
<certificateFile>server.crt</certificateFile> <!--
<privateKeyFile>server.key</privateKeyFile> <https_port>8443</https_port>
<!-- openssl dhparam -out dhparam.pem 4096 --> <tcp_port_secure>9440</tcp_port_secure>
<dhParamsFile>dhparam.pem</dhParamsFile> -->
<loadDefaultCAFile>true</loadDefaultCAFile>
<cacheSessions>true</cacheSessions> <!-- 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 -->
<disableProtocols>sslv2,sslv3</disableProtocols> <openSSL>
<preferServerCiphers>true</preferServerCiphers> <server> <!-- Used for https server AND secure tcp port -->
</server> <!-- 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 -->
<client> <certificateFile>/etc/clickhouse-server/server.crt</certificateFile>
<loadDefaultCAFile>true</loadDefaultCAFile> <privateKeyFile>/etc/clickhouse-server/server.key</privateKeyFile>
<cacheSessions>true</cacheSessions> <!-- openssl dhparam -out /etc/clickhouse-server/dhparam.pem 4096 -->
<disableProtocols>sslv2,sslv3</disableProtocols> <dhParamsFile>/etc/clickhouse-server/dhparam.pem</dhParamsFile>
<preferServerCiphers>true</preferServerCiphers> <verificationMode>none</verificationMode>
<!-- Use for self-signed: <verificationMode>none</verificationMode> --> <loadDefaultCAFile>true</loadDefaultCAFile>
<invalidCertificateHandler> <cacheSessions>true</cacheSessions>
<!-- Use for self-signed: <name>AcceptCertificateHandler</name> --> <disableProtocols>sslv2,sslv3</disableProtocols>
<name>RejectCertificateHandler</name> <preferServerCiphers>true</preferServerCiphers>
</invalidCertificateHandler> </server>
</client>
</openSSL> <client> <!-- Used for connecting to https dictionary source -->
<loadDefaultCAFile>true</loadDefaultCAFile>
<!-- Default root page on http[s] server. For example load UI from https://tabix.io/ when opening http://localhost:8123 --> <cacheSessions>true</cacheSessions>
<!-- <disableProtocols>sslv2,sslv3</disableProtocols>
<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> <preferServerCiphers>true</preferServerCiphers>
--> <!-- Use for self-signed: <verificationMode>none</verificationMode> -->
<invalidCertificateHandler>
<tcp_port>9000</tcp_port> <!-- Use for self-signed: <name>AcceptCertificateHandler</name> -->
<name>RejectCertificateHandler</name>
<!-- Port for communication between replicas. Used for data exchange. --> </invalidCertificateHandler>
<interserver_http_port>9010</interserver_http_port> </client>
</openSSL>
<!-- Hostname that is used by other replicas to request this server.
If not specified, than it is determined analoguous to 'hostname -f' command. <!-- Default root page on http[s] server. For example load UI from https://tabix.io/ when opening http://localhost:8123 -->
This setting could be used to switch replication to another network interface. <!--
--> <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>
<!-- -->
<interserver_http_host>example.yandex.ru</interserver_http_host>
--> <!-- Port for communication between replicas. Used for data exchange. -->
<interserver_http_port>9009</interserver_http_port>
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
<listen_host>::</listen_host> <!-- Hostname that is used by other replicas to request this server.
<!--<listen_host>::</listen_host>--> If not specified, than it is determined analoguous to 'hostname -f' command.
<listen_host>127.0.0.1</listen_host> This setting could be used to switch replication to another network interface.
-->
<max_connections>4096</max_connections> <!--
<keep_alive_timeout>3</keep_alive_timeout> <interserver_http_host>example.yandex.ru</interserver_http_host>
-->
<!-- Maximum number of concurrent queries. -->
<max_concurrent_queries>100</max_concurrent_queries> <!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
<!-- <listen_host>::</listen_host> -->
<!-- Set limit on number of open files (default: maximum). This setting makes sense on Mac OS X because getrlimit() fails to retrieve <!-- Same for hosts with disabled ipv6: -->
correct maximum value. --> <!-- <listen_host>0.0.0.0</listen_host> -->
<!-- <max_open_files>262144</max_open_files> -->
<!-- Default values - try listen localhost on ipv4 and ipv6: -->
<!-- Size of cache of uncompressed blocks of data, used in tables of MergeTree family. <!--
In bytes. Cache is single for server. Memory is allocated only on demand. <listen_host>::1</listen_host>
Cache is used when 'use_uncompressed_cache' user setting turned on (off by default). <listen_host>127.0.0.1</listen_host>
Uncompressed cache is advantageous only for very short queries and in rare cases. -->
--> <!-- Don't exit if ipv6 or ipv4 unavailable, but listen_host with this protocol specified -->
<uncompressed_cache_size>8589934592</uncompressed_cache_size> <!-- <listen_try>0</listen_try> -->
<!-- Approximate size of mark cache, used in tables of MergeTree family. <!-- Allow listen on same address:port -->
In bytes. Cache is single for server. Memory is allocated only on demand. <!-- <listen_reuse_port>0</listen_reuse_port> -->
You should not lower this value.
--> <!-- <listen_backlog>64</listen_backlog> -->
<mark_cache_size>5368709120</mark_cache_size>
<max_connections>4096</max_connections>
<keep_alive_timeout>3</keep_alive_timeout>
<!-- Path to data directory, with trailing slash. -->
<path>/var/lib/clickhouse/</path> <!-- Maximum number of concurrent queries. -->
<max_concurrent_queries>100</max_concurrent_queries>
<!-- Path to temporary data for processing hard queries. -->
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path> <!-- Set limit on number of open files (default: maximum). This setting makes sense on Mac OS X because getrlimit() fails to retrieve
correct maximum value. -->
<!-- Path to configuration file with users, access rights, profiles of settings, quotas. --> <!-- <max_open_files>262144</max_open_files> -->
<users_config>users.xml</users_config>
<!-- Size of cache of uncompressed blocks of data, used in tables of MergeTree family.
<!-- Default profile of settings.. --> In bytes. Cache is single for server. Memory is allocated only on demand.
<default_profile>default</default_profile> Cache is used when 'use_uncompressed_cache' user setting turned on (off by default).
Uncompressed cache is advantageous only for very short queries and in rare cases.
<!-- Default database. --> -->
<default_database>default</default_database> <uncompressed_cache_size>8589934592</uncompressed_cache_size>
<!-- Server time zone could be set here. <!-- Approximate size of mark cache, used in tables of MergeTree family.
In bytes. Cache is single for server. Memory is allocated only on demand.
Time zone is used when converting between String and DateTime types, You should not lower this value.
when printing DateTime in text formats and parsing DateTime from text, -->
it is used in date and time related functions, if specific time zone was not passed as an argument. <mark_cache_size>5368709120</mark_cache_size>
Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
If not specified, system time zone at server startup is used. <!-- Path to data directory, with trailing slash. -->
--> <path>/var/lib/clickhouse/</path>
<!-- <timezone>Europe/Moscow</timezone> -->
<!-- Path to temporary data for processing hard queries. -->
<!-- Configuration of clusters that could be used in Distributed tables. <tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
https://clickhouse.yandex/reference_en.html#Distributed
--> <!-- Directory with user provided files that are accessible by 'file' table function. -->
<remote_servers incl="clickhouse_remote_servers" /> <user_files_path>/var/lib/clickhouse/user_files/</user_files_path>
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file. <!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element. <users_config>users.xml</users_config>
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
--> <!-- Default profile of settings. -->
<default_profile>default</default_profile>
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
<!-- System profile of settings. This settings are used by internal processes (Buffer storage, Distibuted DDL worker and so on). -->
<!-- Substitutions for parameters of replicated tables. <!-- <system_profile>default</system_profile> -->
Optional. If you don't use replicated tables, you could omit that.
<!-- Default database. -->
See https://clickhouse.yandex/reference_en.html#Creating%20replicated%20tables <default_database>default</default_database>
-->
<macros> <!-- Server time zone could be set here.
<shard>shard_01</shard>
<replica>replica_01</replica> Time zone is used when converting between String and DateTime types,
</macros> when printing DateTime in text formats and parsing DateTime from text,
it is used in date and time related functions, if specific time zone was not passed as an argument.
<include_from>/etc/clickhouse-server/metrika.xml</include_from>
Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. --> If not specified, system time zone at server startup is used.
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
Please note, that server could display time zone alias instead of specified name.
<!-- Sending data to Graphite for monitoring. Several sections can be defined. --> Example: W-SU is an alias for Europe/Moscow and Zulu is an alias for UTC.
<!-- -->
interval - send every X second <!-- <timezone>Europe/Moscow</timezone> -->
root_path - prefix for keys
metrics - send data from table system.metrics <!-- You can specify umask here (see "man umask"). Server will apply it on startup.
events - send data from table system.events Number is always parsed as octal. Default umask is 027 (other users cannot read logs, data files, etc; group can only read).
asynchronous_metrics - send data from table system.asynchronous_metrics -->
--> <!-- <umask>022</umask> -->
<!--
<graphite> <!-- Perform mlockall after startup to lower first queries latency
<host>localhost</host> and to prevent clickhouse executable from being paged out under high IO load.
<port>42000</port> Enabling this option is recommended but will lead to increased startup time for up to a few seconds.
<timeout>0.1</timeout> -->
<interval>60</interval> <mlock_executable>false</mlock_executable>
<root_path>one_min</root_path>
<!-- Configuration of clusters that could be used in Distributed tables.
<metrics>true</metrics> https://clickhouse.yandex/docs/en/table_engines/distributed/
<events>true</events> -->
<asynchronous_metrics>true</asynchronous_metrics> <remote_servers incl="clickhouse_remote_servers" />
</graphite>
<graphite>
<host>localhost</host> <!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
<port>42000</port> By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
<timeout>0.1</timeout> Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
<interval>1</interval> -->
<root_path>one_sec</root_path>
<!-- ZooKeeper is used to store metadata about replicas, when using Replicated tables.
<metrics>true</metrics> Optional. If you don't use replicated tables, you could omit that.
<events>true</events>
<asynchronous_metrics>false</asynchronous_metrics> See https://clickhouse.yandex/docs/en/table_engines/replication/
</graphite> -->
-->
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
<!-- Query log. Used only for queries with setting log_queries = 1. -->
<query_log> <!-- Substitutions for parameters of replicated tables.
<!-- What table to insert data. If table is not exist, it will be created. Optional. If you don't use replicated tables, you could omit that.
When query log structure is changed after system update,
then old table will be renamed and new table will be created automatically. See https://clickhouse.yandex/docs/en/table_engines/replication/#creating-replicated-tables
--> -->
<database>system</database> <macros>
<table>query_log</table> <shard>shard_01</shard>
<replica>replica_01</replica>
<!-- Interval of flushing data. --> </macros>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</query_log> <include_from>/etc/clickhouse-server/metrika.xml</include_from>
<!-- Uncomment if use part_log <!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
<part_log> <builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
<database>system</database>
<table>part_log</table>
<!-- Maximum session timeout, in seconds. Default: 3600. -->
<flush_interval_milliseconds>7500</flush_interval_milliseconds> <max_session_timeout>3600</max_session_timeout>
</part_log>
--> <!-- Default session timeout, in seconds. Default: 60. -->
<default_session_timeout>60</default_session_timeout>
<!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
See https://clickhouse.yandex/reference_en.html#Internal%20dictionaries <!-- Sending data to Graphite for monitoring. Several sections can be defined. -->
--> <!--
interval - send every X second
<!-- Path to file with region hierarchy. --> root_path - prefix for keys
<!-- <path_to_regions_hierarchy_file>/opt/geo/regions_hierarchy.txt</path_to_regions_hierarchy_file> --> hostname_in_path - append hostname to root_path (default = true)
metrics - send data from table system.metrics
<!-- Path to directory with files containing names of regions --> events - send data from table system.events
<!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> --> asynchronous_metrics - send data from table system.asynchronous_metrics
-->
<!-- Configuration of external dictionaries. See: <!--
https://clickhouse.yandex/reference_en.html#External%20Dictionaries <graphite>
--> <host>localhost</host>
<dictionaries_config>*_dictionary.xml</dictionaries_config> <port>42000</port>
<timeout>0.1</timeout>
<!-- Uncomment if you want data to be compressed 30-100% better. <interval>60</interval>
Don't do that if you just started using ClickHouse. <root_path>one_min</root_path>
--> <hostname_in_path>true</hostname_in_path>
<compression incl="clickhouse_compression">
<!-- <metrics>true</metrics>
<!- - Set of variants. Checked in order. Last matching case wins. If nothing matches, lz4 will be used. - -> <events>true</events>
<case> <events_cumulative>false</events_cumulative>
<asynchronous_metrics>true</asynchronous_metrics>
<!- - Conditions. All must be satisfied. Some conditions may be omitted. - -> </graphite>
<min_part_size>10000000000</min_part_size> <!- - Min part size in bytes. - -> <graphite>
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - -> <host>localhost</host>
<port>42000</port>
<!- - What compression method to use. - -> <timeout>0.1</timeout>
<method>zstd</method> <!- - Keep in mind that zstd compression library is highly experimental. - -> <interval>1</interval>
</case> <root_path>one_sec</root_path>
-->
</compression> <metrics>true</metrics>
<events>true</events>
<resharding> <events_cumulative>false</events_cumulative>
<task_queue_path>/clickhouse/task_queue</task_queue_path> <asynchronous_metrics>false</asynchronous_metrics>
</resharding> </graphite>
-->
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
<!--
<merge_tree> <!-- Query log. Used only for queries with setting log_queries = 1. -->
<max_suspicious_broken_parts>5</max_suspicious_broken_parts> <query_log>
</merge_tree> <!-- What table to insert data. If table is not exist, it will be created.
--> When query log structure is changed after system update,
then old table will be renamed and new table will be created automatically.
<!-- Protection from accidental DROP. -->
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. <database>system</database>
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. <table>query_log</table>
By default max_table_size_to_drop is 50GB, max_table_size_to_drop=0 allows to DROP any tables. <!--
Uncomment to disable protection. PARTITION BY expr https://clickhouse.yandex/docs/en/table_engines/custom_partitioning_key/
--> Example:
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> --> event_date
toMonday(event_date)
<!-- Example of parameters for GraphiteMergeTree table engine --> toYYYYMM(event_date)
<graphite_rollup_example> toStartOfHour(event_time)
<pattern> -->
<regexp>click_cost</regexp> <partition_by>toYYYYMM(event_date)</partition_by>
<function>any</function> <!-- Interval of flushing data. -->
<retention> <flush_interval_milliseconds>7500</flush_interval_milliseconds>
<age>0</age> </query_log>
<precision>3600</precision>
</retention> <!-- Trace log. Stores stack traces collected by query profilers.
<retention> See query_profiler_real_time_period_ns and query_profiler_cpu_time_period_ns settings. -->
<age>86400</age> <trace_log>
<precision>60</precision> <database>system</database>
</retention> <table>trace_log</table>
</pattern>
<default> <partition_by>toYYYYMM(event_date)</partition_by>
<function>max</function> <flush_interval_milliseconds>7500</flush_interval_milliseconds>
<retention> </trace_log>
<age>0</age>
<precision>60</precision> <!-- Query thread log. Has information about all threads participated in query execution.
</retention> Used only for queries with setting log_query_threads = 1. -->
<retention> <query_thread_log>
<age>3600</age> <database>system</database>
<precision>300</precision> <table>query_thread_log</table>
</retention> <partition_by>toYYYYMM(event_date)</partition_by>
<retention> <flush_interval_milliseconds>7500</flush_interval_milliseconds>
<age>86400</age> </query_thread_log>
<precision>3600</precision>
</retention> <!-- Uncomment if use part log.
</default> Part log contains information about all actions with parts in MergeTree tables (creation, deletion, merges, downloads).
</graphite_rollup_example> <part_log>
</yandex> <database>system</database>
<table>part_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</part_log>
-->
<!-- Uncomment to write text log into table.
Text log contains all information from usual server log but stores it in structured and efficient way.
<text_log>
<database>system</database>
<table>text_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</text_log>
-->
<!-- Uncomment to write metric log into table.
Metric log contains rows with current values of ProfileEvents, CurrentMetrics collected with "collect_interval_milliseconds" interval.
<metric_log>
<database>system</database>
<table>metric_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
</metric_log>
-->
<!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
See https://clickhouse.yandex/docs/en/dicts/internal_dicts/
-->
<!-- Path to file with region hierarchy. -->
<!-- <path_to_regions_hierarchy_file>/opt/geo/regions_hierarchy.txt</path_to_regions_hierarchy_file> -->
<!-- Path to directory with files containing names of regions -->
<!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> -->
<!-- Configuration of external dictionaries. See:
https://clickhouse.yandex/docs/en/dicts/external_dicts/
-->
<dictionaries_config>*_dictionary.xml</dictionaries_config>
<!-- Uncomment if you want data to be compressed 30-100% better.
Don't do that if you just started using ClickHouse.
-->
<compression incl="clickhouse_compression">
<!--
<!- - Set of variants. Checked in order. Last matching case wins. If nothing matches, lz4 will be used. - ->
<case>
<!- - Conditions. All must be satisfied. Some conditions may be omitted. - ->
<min_part_size>10000000000</min_part_size> <!- - Min part size in bytes. - ->
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - ->
<!- - What compression method to use. - ->
<method>zstd</method>
</case>
-->
</compression>
<!-- Allow to execute distributed DDL queries (CREATE, DROP, ALTER, RENAME) on cluster.
Works only if ZooKeeper is enabled. Comment it if such functionality isn't required. -->
<distributed_ddl>
<!-- Path in ZooKeeper to queue with DDL queries -->
<path>/clickhouse/task_queue/ddl</path>
<!-- Settings from this profile will be used to execute DDL queries -->
<!-- <profile>default</profile> -->
</distributed_ddl>
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
<!--
<merge_tree>
<max_suspicious_broken_parts>5</max_suspicious_broken_parts>
</merge_tree>
-->
<!-- Protection from accidental DROP.
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.
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.
By default max_table_size_to_drop is 50GB; max_table_size_to_drop=0 allows to DROP any tables.
The same for max_partition_size_to_drop.
Uncomment to disable protection.
-->
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> -->
<!-- <max_partition_size_to_drop>0</max_partition_size_to_drop> -->
<!-- Example of parameters for GraphiteMergeTree table engine -->
<graphite_rollup_example>
<pattern>
<regexp>click_cost</regexp>
<function>any</function>
<retention>
<age>0</age>
<precision>3600</precision>
</retention>
<retention>
<age>86400</age>
<precision>60</precision>
</retention>
</pattern>
<default>
<function>max</function>
<retention>
<age>0</age>
<precision>60</precision>
</retention>
<retention>
<age>3600</age>
<precision>300</precision>
</retention>
<retention>
<age>86400</age>
<precision>3600</precision>
</retention>
</default>
</graphite_rollup_example>
<!-- Directory in <clickhouse-path> containing schema files for various input formats.
The directory will be created if it doesn't exist.
-->
<format_schema_path>/var/lib/clickhouse/format_schemas/</format_schema_path>
<!-- Uncomment to use query masking rules.
name - name for the rule (optional)
regexp - RE2 compatible regular expression (mandatory)
replace - substitution string for sensitive data (optional, by default - six asterisks)
<query_masking_rules>
<rule>
<name>hide SSN</name>
<regexp>\b\d{3}-\d{2}-\d{4}\b</regexp>
<replace>000-00-0000</replace>
</rule>
</query_masking_rules>
-->
<!-- Uncomment to disable ClickHouse internal DNS caching. -->
<!-- <disable_internal_dns_cache>1</disable_internal_dns_cache> -->
</yandex>
+417 -279
View File
@@ -1,279 +1,417 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<yandex> <!--
<logger> NOTE: User and query level settings are set up in "users.xml" file.
<level>trace</level> -->
<log>/var/log/clickhouse-server/clickhouse-server.log</log> <yandex>
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog> <logger>
<size>1000M</size> <!-- Possible levels: https://github.com/pocoproject/poco/blob/develop/Foundation/include/Poco/Logger.h#L105 -->
<count>10</count> <level>trace</level>
</logger> <log>/var/log/clickhouse-server/clickhouse-server.log</log>
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
<http_port>8123</http_port> <size>1000M</size>
<count>10</count>
<!-- <!-- <console>1</console> --> <!-- Default behavior is autodetection (log to console if not daemon mode and is tty) -->
<https_port>8443</https_port> </logger>
--> <!--display_name>production</display_name--> <!-- It is the name that will be shown in the client -->
<!-- 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 --> <http_port>8123</http_port>
<openSSL> <tcp_port>9000</tcp_port>
<server>
<!-- openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout server.key -out server.crt --> <!-- For HTTPS and SSL over native protocol. -->
<certificateFile>server.crt</certificateFile> <!--
<privateKeyFile>server.key</privateKeyFile> <https_port>8443</https_port>
<!-- openssl dhparam -out dhparam.pem 4096 --> <tcp_port_secure>9440</tcp_port_secure>
<dhParamsFile>dhparam.pem</dhParamsFile> -->
<loadDefaultCAFile>true</loadDefaultCAFile>
<cacheSessions>true</cacheSessions> <!-- 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 -->
<disableProtocols>sslv2,sslv3</disableProtocols> <openSSL>
<preferServerCiphers>true</preferServerCiphers> <server> <!-- Used for https server AND secure tcp port -->
</server> <!-- 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 -->
<client> <certificateFile>/etc/clickhouse-server/server.crt</certificateFile>
<loadDefaultCAFile>true</loadDefaultCAFile> <privateKeyFile>/etc/clickhouse-server/server.key</privateKeyFile>
<cacheSessions>true</cacheSessions> <!-- openssl dhparam -out /etc/clickhouse-server/dhparam.pem 4096 -->
<disableProtocols>sslv2,sslv3</disableProtocols> <dhParamsFile>/etc/clickhouse-server/dhparam.pem</dhParamsFile>
<preferServerCiphers>true</preferServerCiphers> <verificationMode>none</verificationMode>
<!-- Use for self-signed: <verificationMode>none</verificationMode> --> <loadDefaultCAFile>true</loadDefaultCAFile>
<invalidCertificateHandler> <cacheSessions>true</cacheSessions>
<!-- Use for self-signed: <name>AcceptCertificateHandler</name> --> <disableProtocols>sslv2,sslv3</disableProtocols>
<name>RejectCertificateHandler</name> <preferServerCiphers>true</preferServerCiphers>
</invalidCertificateHandler> </server>
</client>
</openSSL> <client> <!-- Used for connecting to https dictionary source -->
<loadDefaultCAFile>true</loadDefaultCAFile>
<!-- Default root page on http[s] server. For example load UI from https://tabix.io/ when opening http://localhost:8123 --> <cacheSessions>true</cacheSessions>
<!-- <disableProtocols>sslv2,sslv3</disableProtocols>
<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> <preferServerCiphers>true</preferServerCiphers>
--> <!-- Use for self-signed: <verificationMode>none</verificationMode> -->
<invalidCertificateHandler>
<tcp_port>9000</tcp_port> <!-- Use for self-signed: <name>AcceptCertificateHandler</name> -->
<name>RejectCertificateHandler</name>
<!-- Port for communication between replicas. Used for data exchange. --> </invalidCertificateHandler>
<interserver_http_port>9010</interserver_http_port> </client>
</openSSL>
<!-- Hostname that is used by other replicas to request this server.
If not specified, than it is determined analoguous to 'hostname -f' command. <!-- Default root page on http[s] server. For example load UI from https://tabix.io/ when opening http://localhost:8123 -->
This setting could be used to switch replication to another network interface. <!--
--> <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>
<!-- -->
<interserver_http_host>example.yandex.ru</interserver_http_host>
--> <!-- Port for communication between replicas. Used for data exchange. -->
<interserver_http_port>9009</interserver_http_port>
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
<listen_host>::</listen_host> <!-- Hostname that is used by other replicas to request this server.
<!--<listen_host>::</listen_host>--> If not specified, than it is determined analoguous to 'hostname -f' command.
<listen_host>127.0.0.1</listen_host> This setting could be used to switch replication to another network interface.
-->
<max_connections>4096</max_connections> <!--
<keep_alive_timeout>3</keep_alive_timeout> <interserver_http_host>example.yandex.ru</interserver_http_host>
-->
<!-- Maximum number of concurrent queries. -->
<max_concurrent_queries>100</max_concurrent_queries> <!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
<!-- <listen_host>::</listen_host> -->
<!-- Set limit on number of open files (default: maximum). This setting makes sense on Mac OS X because getrlimit() fails to retrieve <!-- Same for hosts with disabled ipv6: -->
correct maximum value. --> <!-- <listen_host>0.0.0.0</listen_host> -->
<!-- <max_open_files>262144</max_open_files> -->
<!-- Default values - try listen localhost on ipv4 and ipv6: -->
<!-- Size of cache of uncompressed blocks of data, used in tables of MergeTree family. <!--
In bytes. Cache is single for server. Memory is allocated only on demand. <listen_host>::1</listen_host>
Cache is used when 'use_uncompressed_cache' user setting turned on (off by default). <listen_host>127.0.0.1</listen_host>
Uncompressed cache is advantageous only for very short queries and in rare cases. -->
--> <!-- Don't exit if ipv6 or ipv4 unavailable, but listen_host with this protocol specified -->
<uncompressed_cache_size>8589934592</uncompressed_cache_size> <!-- <listen_try>0</listen_try> -->
<!-- Approximate size of mark cache, used in tables of MergeTree family. <!-- Allow listen on same address:port -->
In bytes. Cache is single for server. Memory is allocated only on demand. <!-- <listen_reuse_port>0</listen_reuse_port> -->
You should not lower this value.
--> <!-- <listen_backlog>64</listen_backlog> -->
<mark_cache_size>5368709120</mark_cache_size>
<max_connections>4096</max_connections>
<!-- Path to data directory, with trailing slash. --> <keep_alive_timeout>3</keep_alive_timeout>
<path>/var/lib/clickhouse/</path>
<!-- Maximum number of concurrent queries. -->
<!-- Path to temporary data for processing hard queries. --> <max_concurrent_queries>100</max_concurrent_queries>
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
<!-- Set limit on number of open files (default: maximum). This setting makes sense on Mac OS X because getrlimit() fails to retrieve
<!-- Path to configuration file with users, access rights, profiles of settings, quotas. --> correct maximum value. -->
<users_config>users.xml</users_config> <!-- <max_open_files>262144</max_open_files> -->
<!-- Default profile of settings.. --> <!-- Size of cache of uncompressed blocks of data, used in tables of MergeTree family.
<default_profile>default</default_profile> In bytes. Cache is single for server. Memory is allocated only on demand.
Cache is used when 'use_uncompressed_cache' user setting turned on (off by default).
<!-- Default database. --> Uncompressed cache is advantageous only for very short queries and in rare cases.
<default_database>default</default_database> -->
<uncompressed_cache_size>8589934592</uncompressed_cache_size>
<!-- Server time zone could be set here.
<!-- Approximate size of mark cache, used in tables of MergeTree family.
Time zone is used when converting between String and DateTime types, In bytes. Cache is single for server. Memory is allocated only on demand.
when printing DateTime in text formats and parsing DateTime from text, You should not lower this value.
it is used in date and time related functions, if specific time zone was not passed as an argument. -->
<mark_cache_size>5368709120</mark_cache_size>
Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
If not specified, system time zone at server startup is used.
--> <!-- Path to data directory, with trailing slash. -->
<!-- <timezone>Europe/Moscow</timezone> --> <path>/var/lib/clickhouse/</path>
<!-- Configuration of clusters that could be used in Distributed tables. <!-- Path to temporary data for processing hard queries. -->
https://clickhouse.yandex/reference_en.html#Distributed <tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
-->
<remote_servers incl="clickhouse_remote_servers" /> <!-- Directory with user provided files that are accessible by 'file' table function. -->
<user_files_path>/var/lib/clickhouse/user_files/</user_files_path>
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element. <!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
Values for substitutions are specified in /yandex/name_of_substitution elements in that file. <users_config>users.xml</users_config>
-->
<!-- Default profile of settings. -->
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" /> <default_profile>default</default_profile>
<!-- Substitutions for parameters of replicated tables. <!-- System profile of settings. This settings are used by internal processes (Buffer storage, Distibuted DDL worker and so on). -->
Optional. If you don't use replicated tables, you could omit that. <!-- <system_profile>default</system_profile> -->
See https://clickhouse.yandex/reference_en.html#Creating%20replicated%20tables <!-- Default database. -->
--> <default_database>default</default_database>
<macros>
<shard>shard_01</shard> <!-- Server time zone could be set here.
<replica>replica_02</replica>
</macros> Time zone is used when converting between String and DateTime types,
when printing DateTime in text formats and parsing DateTime from text,
<include_from>/etc/clickhouse-server/metrika.xml</include_from> it is used in date and time related functions, if specific time zone was not passed as an argument.
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. --> Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval> If not specified, system time zone at server startup is used.
Please note, that server could display time zone alias instead of specified name.
<!-- Sending data to Graphite for monitoring. Several sections can be defined. --> Example: W-SU is an alias for Europe/Moscow and Zulu is an alias for UTC.
<!-- -->
interval - send every X second <!-- <timezone>Europe/Moscow</timezone> -->
root_path - prefix for keys
metrics - send data from table system.metrics <!-- You can specify umask here (see "man umask"). Server will apply it on startup.
events - send data from table system.events Number is always parsed as octal. Default umask is 027 (other users cannot read logs, data files, etc; group can only read).
asynchronous_metrics - send data from table system.asynchronous_metrics -->
--> <!-- <umask>022</umask> -->
<!--
<graphite> <!-- Perform mlockall after startup to lower first queries latency
<host>localhost</host> and to prevent clickhouse executable from being paged out under high IO load.
<port>42000</port> Enabling this option is recommended but will lead to increased startup time for up to a few seconds.
<timeout>0.1</timeout> -->
<interval>60</interval> <mlock_executable>false</mlock_executable>
<root_path>one_min</root_path>
<!-- Configuration of clusters that could be used in Distributed tables.
<metrics>true</metrics> https://clickhouse.yandex/docs/en/table_engines/distributed/
<events>true</events> -->
<asynchronous_metrics>true</asynchronous_metrics> <remote_servers incl="clickhouse_remote_servers" />
</graphite>
<graphite>
<host>localhost</host> <!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
<port>42000</port> By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
<timeout>0.1</timeout> Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
<interval>1</interval> -->
<root_path>one_sec</root_path>
<!-- ZooKeeper is used to store metadata about replicas, when using Replicated tables.
<metrics>true</metrics> Optional. If you don't use replicated tables, you could omit that.
<events>true</events>
<asynchronous_metrics>false</asynchronous_metrics> See https://clickhouse.yandex/docs/en/table_engines/replication/
</graphite> -->
-->
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
<!-- Query log. Used only for queries with setting log_queries = 1. -->
<query_log> <!-- Substitutions for parameters of replicated tables.
<!-- What table to insert data. If table is not exist, it will be created. Optional. If you don't use replicated tables, you could omit that.
When query log structure is changed after system update,
then old table will be renamed and new table will be created automatically. See https://clickhouse.yandex/docs/en/table_engines/replication/#creating-replicated-tables
--> -->
<database>system</database> <macros>
<table>query_log</table> <shard>shard_01</shard>
<replica>replica_02</replica>
<!-- Interval of flushing data. --> </macros>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</query_log> <include_from>/etc/clickhouse-server/metrika.xml</include_from>
<!-- Uncomment if use part_log <!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
<part_log> <builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
<database>system</database>
<table>part_log</table>
<!-- Maximum session timeout, in seconds. Default: 3600. -->
<flush_interval_milliseconds>7500</flush_interval_milliseconds> <max_session_timeout>3600</max_session_timeout>
</part_log>
--> <!-- Default session timeout, in seconds. Default: 60. -->
<default_session_timeout>60</default_session_timeout>
<!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
See https://clickhouse.yandex/reference_en.html#Internal%20dictionaries <!-- Sending data to Graphite for monitoring. Several sections can be defined. -->
--> <!--
interval - send every X second
<!-- Path to file with region hierarchy. --> root_path - prefix for keys
<!-- <path_to_regions_hierarchy_file>/opt/geo/regions_hierarchy.txt</path_to_regions_hierarchy_file> --> hostname_in_path - append hostname to root_path (default = true)
metrics - send data from table system.metrics
<!-- Path to directory with files containing names of regions --> events - send data from table system.events
<!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> --> asynchronous_metrics - send data from table system.asynchronous_metrics
-->
<!-- Configuration of external dictionaries. See: <!--
https://clickhouse.yandex/reference_en.html#External%20Dictionaries <graphite>
--> <host>localhost</host>
<dictionaries_config>*_dictionary.xml</dictionaries_config> <port>42000</port>
<timeout>0.1</timeout>
<!-- Uncomment if you want data to be compressed 30-100% better. <interval>60</interval>
Don't do that if you just started using ClickHouse. <root_path>one_min</root_path>
--> <hostname_in_path>true</hostname_in_path>
<compression incl="clickhouse_compression">
<!-- <metrics>true</metrics>
<!- - Set of variants. Checked in order. Last matching case wins. If nothing matches, lz4 will be used. - -> <events>true</events>
<case> <events_cumulative>false</events_cumulative>
<asynchronous_metrics>true</asynchronous_metrics>
<!- - Conditions. All must be satisfied. Some conditions may be omitted. - -> </graphite>
<min_part_size>10000000000</min_part_size> <!- - Min part size in bytes. - -> <graphite>
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - -> <host>localhost</host>
<port>42000</port>
<!- - What compression method to use. - -> <timeout>0.1</timeout>
<method>zstd</method> <!- - Keep in mind that zstd compression library is highly experimental. - -> <interval>1</interval>
</case> <root_path>one_sec</root_path>
-->
</compression> <metrics>true</metrics>
<events>true</events>
<resharding> <events_cumulative>false</events_cumulative>
<task_queue_path>/clickhouse/task_queue</task_queue_path> <asynchronous_metrics>false</asynchronous_metrics>
</resharding> </graphite>
-->
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
<!--
<merge_tree> <!-- Query log. Used only for queries with setting log_queries = 1. -->
<max_suspicious_broken_parts>5</max_suspicious_broken_parts> <query_log>
</merge_tree> <!-- What table to insert data. If table is not exist, it will be created.
--> When query log structure is changed after system update,
then old table will be renamed and new table will be created automatically.
<!-- Protection from accidental DROP. -->
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. <database>system</database>
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. <table>query_log</table>
By default max_table_size_to_drop is 50GB, max_table_size_to_drop=0 allows to DROP any tables. <!--
Uncomment to disable protection. PARTITION BY expr https://clickhouse.yandex/docs/en/table_engines/custom_partitioning_key/
--> Example:
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> --> event_date
toMonday(event_date)
<!-- Example of parameters for GraphiteMergeTree table engine --> toYYYYMM(event_date)
<graphite_rollup_example> toStartOfHour(event_time)
<pattern> -->
<regexp>click_cost</regexp> <partition_by>toYYYYMM(event_date)</partition_by>
<function>any</function> <!-- Interval of flushing data. -->
<retention> <flush_interval_milliseconds>7500</flush_interval_milliseconds>
<age>0</age> </query_log>
<precision>3600</precision>
</retention> <!-- Trace log. Stores stack traces collected by query profilers.
<retention> See query_profiler_real_time_period_ns and query_profiler_cpu_time_period_ns settings. -->
<age>86400</age> <trace_log>
<precision>60</precision> <database>system</database>
</retention> <table>trace_log</table>
</pattern>
<default> <partition_by>toYYYYMM(event_date)</partition_by>
<function>max</function> <flush_interval_milliseconds>7500</flush_interval_milliseconds>
<retention> </trace_log>
<age>0</age>
<precision>60</precision> <!-- Query thread log. Has information about all threads participated in query execution.
</retention> Used only for queries with setting log_query_threads = 1. -->
<retention> <query_thread_log>
<age>3600</age> <database>system</database>
<precision>300</precision> <table>query_thread_log</table>
</retention> <partition_by>toYYYYMM(event_date)</partition_by>
<retention> <flush_interval_milliseconds>7500</flush_interval_milliseconds>
<age>86400</age> </query_thread_log>
<precision>3600</precision>
</retention> <!-- Uncomment if use part log.
</default> Part log contains information about all actions with parts in MergeTree tables (creation, deletion, merges, downloads).
</graphite_rollup_example> <part_log>
</yandex> <database>system</database>
<table>part_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</part_log>
-->
<!-- Uncomment to write text log into table.
Text log contains all information from usual server log but stores it in structured and efficient way.
<text_log>
<database>system</database>
<table>text_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</text_log>
-->
<!-- Uncomment to write metric log into table.
Metric log contains rows with current values of ProfileEvents, CurrentMetrics collected with "collect_interval_milliseconds" interval.
<metric_log>
<database>system</database>
<table>metric_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
</metric_log>
-->
<!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
See https://clickhouse.yandex/docs/en/dicts/internal_dicts/
-->
<!-- Path to file with region hierarchy. -->
<!-- <path_to_regions_hierarchy_file>/opt/geo/regions_hierarchy.txt</path_to_regions_hierarchy_file> -->
<!-- Path to directory with files containing names of regions -->
<!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> -->
<!-- Configuration of external dictionaries. See:
https://clickhouse.yandex/docs/en/dicts/external_dicts/
-->
<dictionaries_config>*_dictionary.xml</dictionaries_config>
<!-- Uncomment if you want data to be compressed 30-100% better.
Don't do that if you just started using ClickHouse.
-->
<compression incl="clickhouse_compression">
<!--
<!- - Set of variants. Checked in order. Last matching case wins. If nothing matches, lz4 will be used. - ->
<case>
<!- - Conditions. All must be satisfied. Some conditions may be omitted. - ->
<min_part_size>10000000000</min_part_size> <!- - Min part size in bytes. - ->
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - ->
<!- - What compression method to use. - ->
<method>zstd</method>
</case>
-->
</compression>
<!-- Allow to execute distributed DDL queries (CREATE, DROP, ALTER, RENAME) on cluster.
Works only if ZooKeeper is enabled. Comment it if such functionality isn't required. -->
<distributed_ddl>
<!-- Path in ZooKeeper to queue with DDL queries -->
<path>/clickhouse/task_queue/ddl</path>
<!-- Settings from this profile will be used to execute DDL queries -->
<!-- <profile>default</profile> -->
</distributed_ddl>
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
<!--
<merge_tree>
<max_suspicious_broken_parts>5</max_suspicious_broken_parts>
</merge_tree>
-->
<!-- Protection from accidental DROP.
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.
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.
By default max_table_size_to_drop is 50GB; max_table_size_to_drop=0 allows to DROP any tables.
The same for max_partition_size_to_drop.
Uncomment to disable protection.
-->
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> -->
<!-- <max_partition_size_to_drop>0</max_partition_size_to_drop> -->
<!-- Example of parameters for GraphiteMergeTree table engine -->
<graphite_rollup_example>
<pattern>
<regexp>click_cost</regexp>
<function>any</function>
<retention>
<age>0</age>
<precision>3600</precision>
</retention>
<retention>
<age>86400</age>
<precision>60</precision>
</retention>
</pattern>
<default>
<function>max</function>
<retention>
<age>0</age>
<precision>60</precision>
</retention>
<retention>
<age>3600</age>
<precision>300</precision>
</retention>
<retention>
<age>86400</age>
<precision>3600</precision>
</retention>
</default>
</graphite_rollup_example>
<!-- Directory in <clickhouse-path> containing schema files for various input formats.
The directory will be created if it doesn't exist.
-->
<format_schema_path>/var/lib/clickhouse/format_schemas/</format_schema_path>
<!-- Uncomment to use query masking rules.
name - name for the rule (optional)
regexp - RE2 compatible regular expression (mandatory)
replace - substitution string for sensitive data (optional, by default - six asterisks)
<query_masking_rules>
<rule>
<name>hide SSN</name>
<regexp>\b\d{3}-\d{2}-\d{4}\b</regexp>
<replace>000-00-0000</replace>
</rule>
</query_masking_rules>
-->
<!-- Uncomment to disable ClickHouse internal DNS caching. -->
<!-- <disable_internal_dns_cache>1</disable_internal_dns_cache> -->
</yandex>
+417 -278
View File
@@ -1,278 +1,417 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<yandex> <!--
<logger> NOTE: User and query level settings are set up in "users.xml" file.
<level>trace</level> -->
<log>/var/log/clickhouse-server/clickhouse-server.log</log> <yandex>
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog> <logger>
<size>1000M</size> <!-- Possible levels: https://github.com/pocoproject/poco/blob/develop/Foundation/include/Poco/Logger.h#L105 -->
<count>10</count> <level>trace</level>
</logger> <log>/var/log/clickhouse-server/clickhouse-server.log</log>
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
<http_port>8123</http_port> <size>1000M</size>
<count>10</count>
<!-- <!-- <console>1</console> --> <!-- Default behavior is autodetection (log to console if not daemon mode and is tty) -->
<https_port>8443</https_port> </logger>
--> <!--display_name>production</display_name--> <!-- It is the name that will be shown in the client -->
<!-- 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 --> <http_port>8123</http_port>
<openSSL> <tcp_port>9000</tcp_port>
<server>
<!-- openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout server.key -out server.crt --> <!-- For HTTPS and SSL over native protocol. -->
<certificateFile>server.crt</certificateFile> <!--
<privateKeyFile>server.key</privateKeyFile> <https_port>8443</https_port>
<!-- openssl dhparam -out dhparam.pem 4096 --> <tcp_port_secure>9440</tcp_port_secure>
<dhParamsFile>dhparam.pem</dhParamsFile> -->
<loadDefaultCAFile>true</loadDefaultCAFile>
<cacheSessions>true</cacheSessions> <!-- 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 -->
<disableProtocols>sslv2,sslv3</disableProtocols> <openSSL>
<preferServerCiphers>true</preferServerCiphers> <server> <!-- Used for https server AND secure tcp port -->
</server> <!-- 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 -->
<client> <certificateFile>/etc/clickhouse-server/server.crt</certificateFile>
<loadDefaultCAFile>true</loadDefaultCAFile> <privateKeyFile>/etc/clickhouse-server/server.key</privateKeyFile>
<cacheSessions>true</cacheSessions> <!-- openssl dhparam -out /etc/clickhouse-server/dhparam.pem 4096 -->
<disableProtocols>sslv2,sslv3</disableProtocols> <dhParamsFile>/etc/clickhouse-server/dhparam.pem</dhParamsFile>
<preferServerCiphers>true</preferServerCiphers> <verificationMode>none</verificationMode>
<!-- Use for self-signed: <verificationMode>none</verificationMode> --> <loadDefaultCAFile>true</loadDefaultCAFile>
<invalidCertificateHandler> <cacheSessions>true</cacheSessions>
<!-- Use for self-signed: <name>AcceptCertificateHandler</name> --> <disableProtocols>sslv2,sslv3</disableProtocols>
<name>RejectCertificateHandler</name> <preferServerCiphers>true</preferServerCiphers>
</invalidCertificateHandler> </server>
</client>
</openSSL> <client> <!-- Used for connecting to https dictionary source -->
<loadDefaultCAFile>true</loadDefaultCAFile>
<!-- Default root page on http[s] server. For example load UI from https://tabix.io/ when opening http://localhost:8123 --> <cacheSessions>true</cacheSessions>
<!-- <disableProtocols>sslv2,sslv3</disableProtocols>
<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> <preferServerCiphers>true</preferServerCiphers>
--> <!-- Use for self-signed: <verificationMode>none</verificationMode> -->
<invalidCertificateHandler>
<tcp_port>9000</tcp_port> <!-- Use for self-signed: <name>AcceptCertificateHandler</name> -->
<name>RejectCertificateHandler</name>
<!-- Port for communication between replicas. Used for data exchange. --> </invalidCertificateHandler>
<interserver_http_port>9010</interserver_http_port> </client>
</openSSL>
<!-- Hostname that is used by other replicas to request this server.
If not specified, than it is determined analoguous to 'hostname -f' command. <!-- Default root page on http[s] server. For example load UI from https://tabix.io/ when opening http://localhost:8123 -->
This setting could be used to switch replication to another network interface. <!--
--> <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>
<!-- -->
<interserver_http_host>example.yandex.ru</interserver_http_host>
--> <!-- Port for communication between replicas. Used for data exchange. -->
<interserver_http_port>9009</interserver_http_port>
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
<listen_host>::</listen_host> <!-- Hostname that is used by other replicas to request this server.
<!--<listen_host>::</listen_host>--> If not specified, than it is determined analoguous to 'hostname -f' command.
<listen_host>127.0.0.1</listen_host> This setting could be used to switch replication to another network interface.
-->
<max_connections>4096</max_connections> <!--
<keep_alive_timeout>3</keep_alive_timeout> <interserver_http_host>example.yandex.ru</interserver_http_host>
-->
<!-- Maximum number of concurrent queries. -->
<max_concurrent_queries>100</max_concurrent_queries> <!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
<!-- <listen_host>::</listen_host> -->
<!-- Set limit on number of open files (default: maximum). This setting makes sense on Mac OS X because getrlimit() fails to retrieve <!-- Same for hosts with disabled ipv6: -->
correct maximum value. --> <!-- <listen_host>0.0.0.0</listen_host> -->
<!-- <max_open_files>262144</max_open_files> -->
<!-- Default values - try listen localhost on ipv4 and ipv6: -->
<!-- Size of cache of uncompressed blocks of data, used in tables of MergeTree family. <!--
In bytes. Cache is single for server. Memory is allocated only on demand. <listen_host>::1</listen_host>
Cache is used when 'use_uncompressed_cache' user setting turned on (off by default). <listen_host>127.0.0.1</listen_host>
Uncompressed cache is advantageous only for very short queries and in rare cases. -->
--> <!-- Don't exit if ipv6 or ipv4 unavailable, but listen_host with this protocol specified -->
<uncompressed_cache_size>8589934592</uncompressed_cache_size> <!-- <listen_try>0</listen_try> -->
<!-- Approximate size of mark cache, used in tables of MergeTree family. <!-- Allow listen on same address:port -->
In bytes. Cache is single for server. Memory is allocated only on demand. <!-- <listen_reuse_port>0</listen_reuse_port> -->
You should not lower this value.
--> <!-- <listen_backlog>64</listen_backlog> -->
<mark_cache_size>5368709120</mark_cache_size>
<max_connections>4096</max_connections>
<!-- Path to data directory, with trailing slash. --> <keep_alive_timeout>3</keep_alive_timeout>
<path>/var/lib/clickhouse/</path>
<!-- Maximum number of concurrent queries. -->
<!-- Path to temporary data for processing hard queries. --> <max_concurrent_queries>100</max_concurrent_queries>
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
<!-- Set limit on number of open files (default: maximum). This setting makes sense on Mac OS X because getrlimit() fails to retrieve
<!-- Path to configuration file with users, access rights, profiles of settings, quotas. --> correct maximum value. -->
<users_config>users.xml</users_config> <!-- <max_open_files>262144</max_open_files> -->
<!-- Default profile of settings.. --> <!-- Size of cache of uncompressed blocks of data, used in tables of MergeTree family.
<default_profile>default</default_profile> In bytes. Cache is single for server. Memory is allocated only on demand.
Cache is used when 'use_uncompressed_cache' user setting turned on (off by default).
<!-- Default database. --> Uncompressed cache is advantageous only for very short queries and in rare cases.
<default_database>default</default_database> -->
<uncompressed_cache_size>8589934592</uncompressed_cache_size>
<!-- Server time zone could be set here.
<!-- Approximate size of mark cache, used in tables of MergeTree family.
Time zone is used when converting between String and DateTime types, In bytes. Cache is single for server. Memory is allocated only on demand.
when printing DateTime in text formats and parsing DateTime from text, You should not lower this value.
it is used in date and time related functions, if specific time zone was not passed as an argument. -->
<mark_cache_size>5368709120</mark_cache_size>
Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
If not specified, system time zone at server startup is used.
--> <!-- Path to data directory, with trailing slash. -->
<!-- <timezone>Europe/Moscow</timezone> --> <path>/var/lib/clickhouse/</path>
<!-- Configuration of clusters that could be used in Distributed tables. <!-- Path to temporary data for processing hard queries. -->
https://clickhouse.yandex/reference_en.html#Distributed <tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
-->
<remote_servers incl="clickhouse_remote_servers" /> <!-- Directory with user provided files that are accessible by 'file' table function. -->
<user_files_path>/var/lib/clickhouse/user_files/</user_files_path>
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element. <!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
Values for substitutions are specified in /yandex/name_of_substitution elements in that file. <users_config>users.xml</users_config>
-->
<!-- Default profile of settings. -->
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" /> <default_profile>default</default_profile>
<!-- Substitutions for parameters of replicated tables. <!-- System profile of settings. This settings are used by internal processes (Buffer storage, Distibuted DDL worker and so on). -->
Optional. If you don't use replicated tables, you could omit that. <!-- <system_profile>default</system_profile> -->
See https://clickhouse.yandex/reference_en.html#Creating%20replicated%20tables <!-- Default database. -->
--> <default_database>default</default_database>
<macros>
<shard>shard_02</shard> <!-- Server time zone could be set here.
<replica>replica_01</replica>
</macros> Time zone is used when converting between String and DateTime types,
when printing DateTime in text formats and parsing DateTime from text,
<include_from>/etc/clickhouse-server/metrika.xml</include_from> it is used in date and time related functions, if specific time zone was not passed as an argument.
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. --> Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval> If not specified, system time zone at server startup is used.
<!-- Sending data to Graphite for monitoring. Several sections can be defined. --> Please note, that server could display time zone alias instead of specified name.
<!-- Example: W-SU is an alias for Europe/Moscow and Zulu is an alias for UTC.
interval - send every X second -->
root_path - prefix for keys <!-- <timezone>Europe/Moscow</timezone> -->
metrics - send data from table system.metrics
events - send data from table system.events <!-- You can specify umask here (see "man umask"). Server will apply it on startup.
asynchronous_metrics - send data from table system.asynchronous_metrics Number is always parsed as octal. Default umask is 027 (other users cannot read logs, data files, etc; group can only read).
--> -->
<!-- <!-- <umask>022</umask> -->
<graphite>
<host>localhost</host> <!-- Perform mlockall after startup to lower first queries latency
<port>42000</port> and to prevent clickhouse executable from being paged out under high IO load.
<timeout>0.1</timeout> Enabling this option is recommended but will lead to increased startup time for up to a few seconds.
<interval>60</interval> -->
<root_path>one_min</root_path> <mlock_executable>false</mlock_executable>
<metrics>true</metrics> <!-- Configuration of clusters that could be used in Distributed tables.
<events>true</events> https://clickhouse.yandex/docs/en/table_engines/distributed/
<asynchronous_metrics>true</asynchronous_metrics> -->
</graphite> <remote_servers incl="clickhouse_remote_servers" />
<graphite>
<host>localhost</host>
<port>42000</port> <!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
<timeout>0.1</timeout> By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
<interval>1</interval> Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
<root_path>one_sec</root_path> -->
<metrics>true</metrics> <!-- ZooKeeper is used to store metadata about replicas, when using Replicated tables.
<events>true</events> Optional. If you don't use replicated tables, you could omit that.
<asynchronous_metrics>false</asynchronous_metrics>
</graphite> See https://clickhouse.yandex/docs/en/table_engines/replication/
--> -->
<!-- Query log. Used only for queries with setting log_queries = 1. --> <zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
<query_log>
<!-- What table to insert data. If table is not exist, it will be created. <!-- Substitutions for parameters of replicated tables.
When query log structure is changed after system update, Optional. If you don't use replicated tables, you could omit that.
then old table will be renamed and new table will be created automatically.
--> See https://clickhouse.yandex/docs/en/table_engines/replication/#creating-replicated-tables
<database>system</database> -->
<table>query_log</table> <macros>
<shard>shard_02</shard>
<!-- Interval of flushing data. --> <replica>replica_01</replica>
<flush_interval_milliseconds>7500</flush_interval_milliseconds> </macros>
</query_log>
<include_from>/etc/clickhouse-server/metrika.xml</include_from>
<!-- Uncomment if use part_log
<part_log> <!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
<database>system</database> <builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
<table>part_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds> <!-- Maximum session timeout, in seconds. Default: 3600. -->
</part_log> <max_session_timeout>3600</max_session_timeout>
-->
<!-- Default session timeout, in seconds. Default: 60. -->
<!-- Parameters for embedded dictionaries, used in Yandex.Metrica. <default_session_timeout>60</default_session_timeout>
See https://clickhouse.yandex/reference_en.html#Internal%20dictionaries
--> <!-- Sending data to Graphite for monitoring. Several sections can be defined. -->
<!--
<!-- Path to file with region hierarchy. --> interval - send every X second
<!-- <path_to_regions_hierarchy_file>/opt/geo/regions_hierarchy.txt</path_to_regions_hierarchy_file> --> root_path - prefix for keys
hostname_in_path - append hostname to root_path (default = true)
<!-- Path to directory with files containing names of regions --> metrics - send data from table system.metrics
<!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> --> events - send data from table system.events
asynchronous_metrics - send data from table system.asynchronous_metrics
<!-- Configuration of external dictionaries. See: -->
https://clickhouse.yandex/reference_en.html#External%20Dictionaries <!--
--> <graphite>
<dictionaries_config>*_dictionary.xml</dictionaries_config> <host>localhost</host>
<port>42000</port>
<!-- Uncomment if you want data to be compressed 30-100% better. <timeout>0.1</timeout>
Don't do that if you just started using ClickHouse. <interval>60</interval>
--> <root_path>one_min</root_path>
<compression incl="clickhouse_compression"> <hostname_in_path>true</hostname_in_path>
<!--
<!- - Set of variants. Checked in order. Last matching case wins. If nothing matches, lz4 will be used. - -> <metrics>true</metrics>
<case> <events>true</events>
<events_cumulative>false</events_cumulative>
<!- - Conditions. All must be satisfied. Some conditions may be omitted. - -> <asynchronous_metrics>true</asynchronous_metrics>
<min_part_size>10000000000</min_part_size> <!- - Min part size in bytes. - -> </graphite>
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - -> <graphite>
<host>localhost</host>
<!- - What compression method to use. - -> <port>42000</port>
<method>zstd</method> <!- - Keep in mind that zstd compression library is highly experimental. - -> <timeout>0.1</timeout>
</case> <interval>1</interval>
--> <root_path>one_sec</root_path>
</compression>
<metrics>true</metrics>
<resharding> <events>true</events>
<task_queue_path>/clickhouse/task_queue</task_queue_path> <events_cumulative>false</events_cumulative>
</resharding> <asynchronous_metrics>false</asynchronous_metrics>
</graphite>
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h --> -->
<!--
<merge_tree>
<max_suspicious_broken_parts>5</max_suspicious_broken_parts> <!-- Query log. Used only for queries with setting log_queries = 1. -->
</merge_tree> <query_log>
--> <!-- What table to insert data. If table is not exist, it will be created.
When query log structure is changed after system update,
<!-- Protection from accidental DROP. then old table will be renamed and new table will be created automatically.
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. -->
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. <database>system</database>
By default max_table_size_to_drop is 50GB, max_table_size_to_drop=0 allows to DROP any tables. <table>query_log</table>
Uncomment to disable protection. <!--
--> PARTITION BY expr https://clickhouse.yandex/docs/en/table_engines/custom_partitioning_key/
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> --> Example:
event_date
<!-- Example of parameters for GraphiteMergeTree table engine --> toMonday(event_date)
<graphite_rollup_example> toYYYYMM(event_date)
<pattern> toStartOfHour(event_time)
<regexp>click_cost</regexp> -->
<function>any</function> <partition_by>toYYYYMM(event_date)</partition_by>
<retention> <!-- Interval of flushing data. -->
<age>0</age> <flush_interval_milliseconds>7500</flush_interval_milliseconds>
<precision>3600</precision> </query_log>
</retention>
<retention> <!-- Trace log. Stores stack traces collected by query profilers.
<age>86400</age> See query_profiler_real_time_period_ns and query_profiler_cpu_time_period_ns settings. -->
<precision>60</precision> <trace_log>
</retention> <database>system</database>
</pattern> <table>trace_log</table>
<default>
<function>max</function> <partition_by>toYYYYMM(event_date)</partition_by>
<retention> <flush_interval_milliseconds>7500</flush_interval_milliseconds>
<age>0</age> </trace_log>
<precision>60</precision>
</retention> <!-- Query thread log. Has information about all threads participated in query execution.
<retention> Used only for queries with setting log_query_threads = 1. -->
<age>3600</age> <query_thread_log>
<precision>300</precision> <database>system</database>
</retention> <table>query_thread_log</table>
<retention> <partition_by>toYYYYMM(event_date)</partition_by>
<age>86400</age> <flush_interval_milliseconds>7500</flush_interval_milliseconds>
<precision>3600</precision> </query_thread_log>
</retention>
</default> <!-- Uncomment if use part log.
</graphite_rollup_example> Part log contains information about all actions with parts in MergeTree tables (creation, deletion, merges, downloads).
</yandex> <part_log>
<database>system</database>
<table>part_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</part_log>
-->
<!-- Uncomment to write text log into table.
Text log contains all information from usual server log but stores it in structured and efficient way.
<text_log>
<database>system</database>
<table>text_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</text_log>
-->
<!-- Uncomment to write metric log into table.
Metric log contains rows with current values of ProfileEvents, CurrentMetrics collected with "collect_interval_milliseconds" interval.
<metric_log>
<database>system</database>
<table>metric_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
</metric_log>
-->
<!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
See https://clickhouse.yandex/docs/en/dicts/internal_dicts/
-->
<!-- Path to file with region hierarchy. -->
<!-- <path_to_regions_hierarchy_file>/opt/geo/regions_hierarchy.txt</path_to_regions_hierarchy_file> -->
<!-- Path to directory with files containing names of regions -->
<!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> -->
<!-- Configuration of external dictionaries. See:
https://clickhouse.yandex/docs/en/dicts/external_dicts/
-->
<dictionaries_config>*_dictionary.xml</dictionaries_config>
<!-- Uncomment if you want data to be compressed 30-100% better.
Don't do that if you just started using ClickHouse.
-->
<compression incl="clickhouse_compression">
<!--
<!- - Set of variants. Checked in order. Last matching case wins. If nothing matches, lz4 will be used. - ->
<case>
<!- - Conditions. All must be satisfied. Some conditions may be omitted. - ->
<min_part_size>10000000000</min_part_size> <!- - Min part size in bytes. - ->
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - ->
<!- - What compression method to use. - ->
<method>zstd</method>
</case>
-->
</compression>
<!-- Allow to execute distributed DDL queries (CREATE, DROP, ALTER, RENAME) on cluster.
Works only if ZooKeeper is enabled. Comment it if such functionality isn't required. -->
<distributed_ddl>
<!-- Path in ZooKeeper to queue with DDL queries -->
<path>/clickhouse/task_queue/ddl</path>
<!-- Settings from this profile will be used to execute DDL queries -->
<!-- <profile>default</profile> -->
</distributed_ddl>
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
<!--
<merge_tree>
<max_suspicious_broken_parts>5</max_suspicious_broken_parts>
</merge_tree>
-->
<!-- Protection from accidental DROP.
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.
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.
By default max_table_size_to_drop is 50GB; max_table_size_to_drop=0 allows to DROP any tables.
The same for max_partition_size_to_drop.
Uncomment to disable protection.
-->
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> -->
<!-- <max_partition_size_to_drop>0</max_partition_size_to_drop> -->
<!-- Example of parameters for GraphiteMergeTree table engine -->
<graphite_rollup_example>
<pattern>
<regexp>click_cost</regexp>
<function>any</function>
<retention>
<age>0</age>
<precision>3600</precision>
</retention>
<retention>
<age>86400</age>
<precision>60</precision>
</retention>
</pattern>
<default>
<function>max</function>
<retention>
<age>0</age>
<precision>60</precision>
</retention>
<retention>
<age>3600</age>
<precision>300</precision>
</retention>
<retention>
<age>86400</age>
<precision>3600</precision>
</retention>
</default>
</graphite_rollup_example>
<!-- Directory in <clickhouse-path> containing schema files for various input formats.
The directory will be created if it doesn't exist.
-->
<format_schema_path>/var/lib/clickhouse/format_schemas/</format_schema_path>
<!-- Uncomment to use query masking rules.
name - name for the rule (optional)
regexp - RE2 compatible regular expression (mandatory)
replace - substitution string for sensitive data (optional, by default - six asterisks)
<query_masking_rules>
<rule>
<name>hide SSN</name>
<regexp>\b\d{3}-\d{2}-\d{4}\b</regexp>
<replace>000-00-0000</replace>
</rule>
</query_masking_rules>
-->
<!-- Uncomment to disable ClickHouse internal DNS caching. -->
<!-- <disable_internal_dns_cache>1</disable_internal_dns_cache> -->
</yandex>
+417 -280
View File
@@ -1,280 +1,417 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<yandex> <!--
<logger> NOTE: User and query level settings are set up in "users.xml" file.
<level>trace</level> -->
<log>/var/log/clickhouse-server/clickhouse-server.log</log> <yandex>
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog> <logger>
<size>1000M</size> <!-- Possible levels: https://github.com/pocoproject/poco/blob/develop/Foundation/include/Poco/Logger.h#L105 -->
<count>10</count> <level>trace</level>
</logger> <log>/var/log/clickhouse-server/clickhouse-server.log</log>
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
<http_port>8123</http_port> <size>1000M</size>
<count>10</count>
<!-- <!-- <console>1</console> --> <!-- Default behavior is autodetection (log to console if not daemon mode and is tty) -->
<https_port>8443</https_port> </logger>
--> <!--display_name>production</display_name--> <!-- It is the name that will be shown in the client -->
<!-- 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 --> <http_port>8123</http_port>
<openSSL> <tcp_port>9000</tcp_port>
<server>
<!-- openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout server.key -out server.crt --> <!-- For HTTPS and SSL over native protocol. -->
<certificateFile>server.crt</certificateFile> <!--
<privateKeyFile>server.key</privateKeyFile> <https_port>8443</https_port>
<!-- openssl dhparam -out dhparam.pem 4096 --> <tcp_port_secure>9440</tcp_port_secure>
<dhParamsFile>dhparam.pem</dhParamsFile> -->
<loadDefaultCAFile>true</loadDefaultCAFile>
<cacheSessions>true</cacheSessions> <!-- 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 -->
<disableProtocols>sslv2,sslv3</disableProtocols> <openSSL>
<preferServerCiphers>true</preferServerCiphers> <server> <!-- Used for https server AND secure tcp port -->
</server> <!-- 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 -->
<client> <certificateFile>/etc/clickhouse-server/server.crt</certificateFile>
<loadDefaultCAFile>true</loadDefaultCAFile> <privateKeyFile>/etc/clickhouse-server/server.key</privateKeyFile>
<cacheSessions>true</cacheSessions> <!-- openssl dhparam -out /etc/clickhouse-server/dhparam.pem 4096 -->
<disableProtocols>sslv2,sslv3</disableProtocols> <dhParamsFile>/etc/clickhouse-server/dhparam.pem</dhParamsFile>
<preferServerCiphers>true</preferServerCiphers> <verificationMode>none</verificationMode>
<!-- Use for self-signed: <verificationMode>none</verificationMode> --> <loadDefaultCAFile>true</loadDefaultCAFile>
<invalidCertificateHandler> <cacheSessions>true</cacheSessions>
<!-- Use for self-signed: <name>AcceptCertificateHandler</name> --> <disableProtocols>sslv2,sslv3</disableProtocols>
<name>RejectCertificateHandler</name> <preferServerCiphers>true</preferServerCiphers>
</invalidCertificateHandler> </server>
</client>
</openSSL> <client> <!-- Used for connecting to https dictionary source -->
<loadDefaultCAFile>true</loadDefaultCAFile>
<!-- Default root page on http[s] server. For example load UI from https://tabix.io/ when opening http://localhost:8123 --> <cacheSessions>true</cacheSessions>
<!-- <disableProtocols>sslv2,sslv3</disableProtocols>
<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> <preferServerCiphers>true</preferServerCiphers>
--> <!-- Use for self-signed: <verificationMode>none</verificationMode> -->
<invalidCertificateHandler>
<tcp_port>9000</tcp_port> <!-- Use for self-signed: <name>AcceptCertificateHandler</name> -->
<name>RejectCertificateHandler</name>
<!-- Port for communication between replicas. Used for data exchange. --> </invalidCertificateHandler>
<interserver_http_port>9010</interserver_http_port> </client>
</openSSL>
<!-- Hostname that is used by other replicas to request this server.
If not specified, than it is determined analoguous to 'hostname -f' command. <!-- Default root page on http[s] server. For example load UI from https://tabix.io/ when opening http://localhost:8123 -->
This setting could be used to switch replication to another network interface. <!--
--> <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>
<!-- -->
<interserver_http_host>example.yandex.ru</interserver_http_host>
--> <!-- Port for communication between replicas. Used for data exchange. -->
<interserver_http_port>9009</interserver_http_port>
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
<listen_host>::</listen_host> <!-- Hostname that is used by other replicas to request this server.
<!--<listen_host>::</listen_host>--> If not specified, than it is determined analoguous to 'hostname -f' command.
<listen_host>127.0.0.1</listen_host> This setting could be used to switch replication to another network interface.
-->
<max_connections>4096</max_connections> <!--
<keep_alive_timeout>3</keep_alive_timeout> <interserver_http_host>example.yandex.ru</interserver_http_host>
-->
<!-- Maximum number of concurrent queries. -->
<max_concurrent_queries>100</max_concurrent_queries> <!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
<!-- <listen_host>::</listen_host> -->
<!-- Set limit on number of open files (default: maximum). This setting makes sense on Mac OS X because getrlimit() fails to retrieve <!-- Same for hosts with disabled ipv6: -->
correct maximum value. --> <!-- <listen_host>0.0.0.0</listen_host> -->
<!-- <max_open_files>262144</max_open_files> -->
<!-- Default values - try listen localhost on ipv4 and ipv6: -->
<!-- Size of cache of uncompressed blocks of data, used in tables of MergeTree family. <!--
In bytes. Cache is single for server. Memory is allocated only on demand. <listen_host>::1</listen_host>
Cache is used when 'use_uncompressed_cache' user setting turned on (off by default). <listen_host>127.0.0.1</listen_host>
Uncompressed cache is advantageous only for very short queries and in rare cases. -->
--> <!-- Don't exit if ipv6 or ipv4 unavailable, but listen_host with this protocol specified -->
<uncompressed_cache_size>8589934592</uncompressed_cache_size> <!-- <listen_try>0</listen_try> -->
<!-- Approximate size of mark cache, used in tables of MergeTree family. <!-- Allow listen on same address:port -->
In bytes. Cache is single for server. Memory is allocated only on demand. <!-- <listen_reuse_port>0</listen_reuse_port> -->
You should not lower this value.
--> <!-- <listen_backlog>64</listen_backlog> -->
<mark_cache_size>5368709120</mark_cache_size>
<max_connections>4096</max_connections>
<!-- Path to data directory, with trailing slash. --> <keep_alive_timeout>3</keep_alive_timeout>
<path>/var/lib/clickhouse/</path>
<!-- Maximum number of concurrent queries. -->
<!-- Path to temporary data for processing hard queries. --> <max_concurrent_queries>100</max_concurrent_queries>
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
<!-- Set limit on number of open files (default: maximum). This setting makes sense on Mac OS X because getrlimit() fails to retrieve
<!-- Path to configuration file with users, access rights, profiles of settings, quotas. --> correct maximum value. -->
<users_config>users.xml</users_config> <!-- <max_open_files>262144</max_open_files> -->
<!-- Default profile of settings.. --> <!-- Size of cache of uncompressed blocks of data, used in tables of MergeTree family.
<default_profile>default</default_profile> In bytes. Cache is single for server. Memory is allocated only on demand.
Cache is used when 'use_uncompressed_cache' user setting turned on (off by default).
<!-- Default database. --> Uncompressed cache is advantageous only for very short queries and in rare cases.
<default_database>default</default_database> -->
<uncompressed_cache_size>8589934592</uncompressed_cache_size>
<!-- Server time zone could be set here.
<!-- Approximate size of mark cache, used in tables of MergeTree family.
Time zone is used when converting between String and DateTime types, In bytes. Cache is single for server. Memory is allocated only on demand.
when printing DateTime in text formats and parsing DateTime from text, You should not lower this value.
it is used in date and time related functions, if specific time zone was not passed as an argument. -->
<mark_cache_size>5368709120</mark_cache_size>
Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
If not specified, system time zone at server startup is used.
--> <!-- Path to data directory, with trailing slash. -->
<!-- <timezone>Europe/Moscow</timezone> --> <path>/var/lib/clickhouse/</path>
<!-- Configuration of clusters that could be used in Distributed tables. <!-- Path to temporary data for processing hard queries. -->
https://clickhouse.yandex/reference_en.html#Distributed <tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
-->
<remote_servers incl="clickhouse_remote_servers" /> <!-- Directory with user provided files that are accessible by 'file' table function. -->
<user_files_path>/var/lib/clickhouse/user_files/</user_files_path>
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element. <!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
Values for substitutions are specified in /yandex/name_of_substitution elements in that file. <users_config>users.xml</users_config>
-->
<!-- Default profile of settings. -->
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" /> <default_profile>default</default_profile>
<!-- Substitutions for parameters of replicated tables. <!-- System profile of settings. This settings are used by internal processes (Buffer storage, Distibuted DDL worker and so on). -->
Optional. If you don't use replicated tables, you could omit that. <!-- <system_profile>default</system_profile> -->
See https://clickhouse.yandex/reference_en.html#Creating%20replicated%20tables <!-- Default database. -->
--> <default_database>default</default_database>
<macros>
<shard>shard_02</shard> <!-- Server time zone could be set here.
<replica>replica_02</replica>
</macros> Time zone is used when converting between String and DateTime types,
when printing DateTime in text formats and parsing DateTime from text,
<include_from>/etc/clickhouse-server/metrika.xml</include_from> it is used in date and time related functions, if specific time zone was not passed as an argument.
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. --> Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval> If not specified, system time zone at server startup is used.
Please note, that server could display time zone alias instead of specified name.
<!-- Sending data to Graphite for monitoring. Several sections can be defined. --> Example: W-SU is an alias for Europe/Moscow and Zulu is an alias for UTC.
<!-- -->
interval - send every X second <!-- <timezone>Europe/Moscow</timezone> -->
root_path - prefix for keys
metrics - send data from table system.metrics <!-- You can specify umask here (see "man umask"). Server will apply it on startup.
events - send data from table system.events Number is always parsed as octal. Default umask is 027 (other users cannot read logs, data files, etc; group can only read).
asynchronous_metrics - send data from table system.asynchronous_metrics -->
--> <!-- <umask>022</umask> -->
<!--
<graphite> <!-- Perform mlockall after startup to lower first queries latency
<host>localhost</host> and to prevent clickhouse executable from being paged out under high IO load.
<port>42000</port> Enabling this option is recommended but will lead to increased startup time for up to a few seconds.
<timeout>0.1</timeout> -->
<interval>60</interval> <mlock_executable>false</mlock_executable>
<root_path>one_min</root_path>
<!-- Configuration of clusters that could be used in Distributed tables.
<metrics>true</metrics> https://clickhouse.yandex/docs/en/table_engines/distributed/
<events>true</events> -->
<asynchronous_metrics>true</asynchronous_metrics> <remote_servers incl="clickhouse_remote_servers" />
</graphite>
<graphite>
<host>localhost</host> <!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
<port>42000</port> By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
<timeout>0.1</timeout> Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
<interval>1</interval> -->
<root_path>one_sec</root_path>
<!-- ZooKeeper is used to store metadata about replicas, when using Replicated tables.
<metrics>true</metrics> Optional. If you don't use replicated tables, you could omit that.
<events>true</events>
<asynchronous_metrics>false</asynchronous_metrics> See https://clickhouse.yandex/docs/en/table_engines/replication/
</graphite> -->
-->
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
<!-- Query log. Used only for queries with setting log_queries = 1. -->
<query_log> <!-- Substitutions for parameters of replicated tables.
<!-- What table to insert data. If table is not exist, it will be created. Optional. If you don't use replicated tables, you could omit that.
When query log structure is changed after system update,
then old table will be renamed and new table will be created automatically. See https://clickhouse.yandex/docs/en/table_engines/replication/#creating-replicated-tables
--> -->
<database>system</database> <macros>
<table>query_log</table> <shard>shard_02</shard>
<replica>replica_02</replica>
<!-- Interval of flushing data. --> </macros>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</query_log> <include_from>/etc/clickhouse-server/metrika.xml</include_from>
<!-- Uncomment if use part_log <!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
<part_log> <builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
<database>system</database>
<table>part_log</table>
<!-- Maximum session timeout, in seconds. Default: 3600. -->
<flush_interval_milliseconds>7500</flush_interval_milliseconds> <max_session_timeout>3600</max_session_timeout>
</part_log>
--> <!-- Default session timeout, in seconds. Default: 60. -->
<default_session_timeout>60</default_session_timeout>
<!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
See https://clickhouse.yandex/reference_en.html#Internal%20dictionaries <!-- Sending data to Graphite for monitoring. Several sections can be defined. -->
--> <!--
interval - send every X second
<!-- Path to file with region hierarchy. --> root_path - prefix for keys
<!-- <path_to_regions_hierarchy_file>/opt/geo/regions_hierarchy.txt</path_to_regions_hierarchy_file> --> hostname_in_path - append hostname to root_path (default = true)
metrics - send data from table system.metrics
<!-- Path to directory with files containing names of regions --> events - send data from table system.events
<!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> --> asynchronous_metrics - send data from table system.asynchronous_metrics
-->
<!--
<!-- Configuration of external dictionaries. See: <graphite>
https://clickhouse.yandex/reference_en.html#External%20Dictionaries <host>localhost</host>
--> <port>42000</port>
<dictionaries_config>*_dictionary.xml</dictionaries_config> <timeout>0.1</timeout>
<interval>60</interval>
<!-- Uncomment if you want data to be compressed 30-100% better. <root_path>one_min</root_path>
Don't do that if you just started using ClickHouse. <hostname_in_path>true</hostname_in_path>
-->
<compression incl="clickhouse_compression"> <metrics>true</metrics>
<!-- <events>true</events>
<!- - Set of variants. Checked in order. Last matching case wins. If nothing matches, lz4 will be used. - -> <events_cumulative>false</events_cumulative>
<case> <asynchronous_metrics>true</asynchronous_metrics>
</graphite>
<!- - Conditions. All must be satisfied. Some conditions may be omitted. - -> <graphite>
<min_part_size>10000000000</min_part_size> <!- - Min part size in bytes. - -> <host>localhost</host>
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - -> <port>42000</port>
<timeout>0.1</timeout>
<!- - What compression method to use. - -> <interval>1</interval>
<method>zstd</method> <!- - Keep in mind that zstd compression library is highly experimental. - -> <root_path>one_sec</root_path>
</case>
--> <metrics>true</metrics>
</compression> <events>true</events>
<events_cumulative>false</events_cumulative>
<resharding> <asynchronous_metrics>false</asynchronous_metrics>
<task_queue_path>/clickhouse/task_queue</task_queue_path> </graphite>
</resharding> -->
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
<!-- <!-- Query log. Used only for queries with setting log_queries = 1. -->
<merge_tree> <query_log>
<max_suspicious_broken_parts>5</max_suspicious_broken_parts> <!-- What table to insert data. If table is not exist, it will be created.
</merge_tree> When query log structure is changed after system update,
--> then old table will be renamed and new table will be created automatically.
-->
<!-- Protection from accidental DROP. <database>system</database>
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. <table>query_log</table>
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. <!--
By default max_table_size_to_drop is 50GB, max_table_size_to_drop=0 allows to DROP any tables. PARTITION BY expr https://clickhouse.yandex/docs/en/table_engines/custom_partitioning_key/
Uncomment to disable protection. Example:
--> event_date
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> --> toMonday(event_date)
toYYYYMM(event_date)
<!-- Example of parameters for GraphiteMergeTree table engine --> toStartOfHour(event_time)
<graphite_rollup_example> -->
<pattern> <partition_by>toYYYYMM(event_date)</partition_by>
<regexp>click_cost</regexp> <!-- Interval of flushing data. -->
<function>any</function> <flush_interval_milliseconds>7500</flush_interval_milliseconds>
<retention> </query_log>
<age>0</age>
<precision>3600</precision> <!-- Trace log. Stores stack traces collected by query profilers.
</retention> See query_profiler_real_time_period_ns and query_profiler_cpu_time_period_ns settings. -->
<retention> <trace_log>
<age>86400</age> <database>system</database>
<precision>60</precision> <table>trace_log</table>
</retention>
</pattern> <partition_by>toYYYYMM(event_date)</partition_by>
<default> <flush_interval_milliseconds>7500</flush_interval_milliseconds>
<function>max</function> </trace_log>
<retention>
<age>0</age> <!-- Query thread log. Has information about all threads participated in query execution.
<precision>60</precision> Used only for queries with setting log_query_threads = 1. -->
</retention> <query_thread_log>
<retention> <database>system</database>
<age>3600</age> <table>query_thread_log</table>
<precision>300</precision> <partition_by>toYYYYMM(event_date)</partition_by>
</retention> <flush_interval_milliseconds>7500</flush_interval_milliseconds>
<retention> </query_thread_log>
<age>86400</age>
<precision>3600</precision> <!-- Uncomment if use part log.
</retention> Part log contains information about all actions with parts in MergeTree tables (creation, deletion, merges, downloads).
</default> <part_log>
</graphite_rollup_example> <database>system</database>
</yandex> <table>part_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</part_log>
-->
<!-- Uncomment to write text log into table.
Text log contains all information from usual server log but stores it in structured and efficient way.
<text_log>
<database>system</database>
<table>text_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</text_log>
-->
<!-- Uncomment to write metric log into table.
Metric log contains rows with current values of ProfileEvents, CurrentMetrics collected with "collect_interval_milliseconds" interval.
<metric_log>
<database>system</database>
<table>metric_log</table>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
</metric_log>
-->
<!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
See https://clickhouse.yandex/docs/en/dicts/internal_dicts/
-->
<!-- Path to file with region hierarchy. -->
<!-- <path_to_regions_hierarchy_file>/opt/geo/regions_hierarchy.txt</path_to_regions_hierarchy_file> -->
<!-- Path to directory with files containing names of regions -->
<!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> -->
<!-- Configuration of external dictionaries. See:
https://clickhouse.yandex/docs/en/dicts/external_dicts/
-->
<dictionaries_config>*_dictionary.xml</dictionaries_config>
<!-- Uncomment if you want data to be compressed 30-100% better.
Don't do that if you just started using ClickHouse.
-->
<compression incl="clickhouse_compression">
<!--
<!- - Set of variants. Checked in order. Last matching case wins. If nothing matches, lz4 will be used. - ->
<case>
<!- - Conditions. All must be satisfied. Some conditions may be omitted. - ->
<min_part_size>10000000000</min_part_size> <!- - Min part size in bytes. - ->
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - ->
<!- - What compression method to use. - ->
<method>zstd</method>
</case>
-->
</compression>
<!-- Allow to execute distributed DDL queries (CREATE, DROP, ALTER, RENAME) on cluster.
Works only if ZooKeeper is enabled. Comment it if such functionality isn't required. -->
<distributed_ddl>
<!-- Path in ZooKeeper to queue with DDL queries -->
<path>/clickhouse/task_queue/ddl</path>
<!-- Settings from this profile will be used to execute DDL queries -->
<!-- <profile>default</profile> -->
</distributed_ddl>
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
<!--
<merge_tree>
<max_suspicious_broken_parts>5</max_suspicious_broken_parts>
</merge_tree>
-->
<!-- Protection from accidental DROP.
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.
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.
By default max_table_size_to_drop is 50GB; max_table_size_to_drop=0 allows to DROP any tables.
The same for max_partition_size_to_drop.
Uncomment to disable protection.
-->
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> -->
<!-- <max_partition_size_to_drop>0</max_partition_size_to_drop> -->
<!-- Example of parameters for GraphiteMergeTree table engine -->
<graphite_rollup_example>
<pattern>
<regexp>click_cost</regexp>
<function>any</function>
<retention>
<age>0</age>
<precision>3600</precision>
</retention>
<retention>
<age>86400</age>
<precision>60</precision>
</retention>
</pattern>
<default>
<function>max</function>
<retention>
<age>0</age>
<precision>60</precision>
</retention>
<retention>
<age>3600</age>
<precision>300</precision>
</retention>
<retention>
<age>86400</age>
<precision>3600</precision>
</retention>
</default>
</graphite_rollup_example>
<!-- Directory in <clickhouse-path> containing schema files for various input formats.
The directory will be created if it doesn't exist.
-->
<format_schema_path>/var/lib/clickhouse/format_schemas/</format_schema_path>
<!-- Uncomment to use query masking rules.
name - name for the rule (optional)
regexp - RE2 compatible regular expression (mandatory)
replace - substitution string for sensitive data (optional, by default - six asterisks)
<query_masking_rules>
<rule>
<name>hide SSN</name>
<regexp>\b\d{3}-\d{2}-\d{4}\b</regexp>
<replace>000-00-0000</replace>
</rule>
</query_masking_rules>
-->
<!-- Uncomment to disable ClickHouse internal DNS caching. -->
<!-- <disable_internal_dns_cache>1</disable_internal_dns_cache> -->
</yandex>