diff --git a/update/ansible/playbook/tasks/roles/clickhouse/defaults/main.yml b/update/ansible/playbook/tasks/roles/clickhouse/defaults/main.yml index cbed66f833..d3fdd3aa69 100644 --- a/update/ansible/playbook/tasks/roles/clickhouse/defaults/main.yml +++ b/update/ansible/playbook/tasks/roles/clickhouse/defaults/main.yml @@ -1 +1 @@ -clickhouse_version: 21.3.20.1-2 +clickhouse_version: 23.8.2.7 diff --git a/update/ansible/playbook/tasks/roles/clickhouse/files/config.xml b/update/ansible/playbook/tasks/roles/clickhouse/files/config.xml index 4998380847..6a1148b12f 100644 --- a/update/ansible/playbook/tasks/roles/clickhouse/files/config.xml +++ b/update/ansible/playbook/tasks/roles/clickhouse/files/config.xml @@ -1,11 +1,10 @@ - - + information 1 - + /srv/logs/clickhouse-server.log + /srv/logs/clickhouse-server.err.log + 1000M + 10 + + + + + + @@ -124,12 +178,13 @@ + + - 0.0.0.0 + + + + + @@ -169,7 +229,7 @@ --> - + 4096 @@ -191,13 +251,12 @@ /path/to/ssl_ca_cert_file - - deflate + deflate - - medium + + 2 -1 @@ -224,6 +283,13 @@ true sslv2,sslv3 true + + + + RejectCertificateHandler + @@ -244,8 +310,15 @@
]]>
--> + + 0 + 0 + - 100 + 1000 + + 0.9 @@ -318,7 +405,7 @@ The amount of data in mapped files can be monitored in system.metrics, system.metric_log by the MMappedFiles, MMappedFileBytes metrics and in system.asynchronous_metrics, system.asynchronous_metrics_log by the MMapCacheCells metric, - and also in system.events, system.processes, system.query_log, system.query_thread_log by the + and also in system.events, system.processes, system.query_log, system.query_thread_log, system.query_views_log by the CreatedReadBufferMMap, CreatedReadBufferMMapFailed, MMappedFileCacheHits, MMappedFileCacheMisses events. Note that the amount of data in mapped files does not consume memory directly and is not accounted in query or server memory usage - because this memory can be discarded similar to OS page cache. @@ -327,15 +414,110 @@ --> 1000 - - 1073741824 + + 134217728 + + + 10000 + + false /srv/clickhouse/ + + + + /srv/clickhouse/tmp/ + + 1 + 1 + 1 + + + sha256_password + + + 12 + + + + + + + false + + + false + + + false + + + false + + + false + + + 600 + + default - + @@ -537,9 +758,9 @@ If not specified, system time zone at server startup is used. 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. + Example: Zulu is an alias for UTC. --> - + - + + + - - - - - localhost - 9000 - - - - - localhost - 9000 - - - - - - - 127.0.0.1 - 9000 - - - - - 127.0.0.2 - 9000 - - - - - - true - - 127.0.0.1 - 9000 - - - - true - - 127.0.0.2 - 9000 - - - - - - - localhost - 9440 - 1 - - - - - - - localhost - 9000 - - - - - localhost - 1 - - - + - + - + + + + toYYYYMM(event_date) + + 7500 + + 1048576 + + 8192 + + 524288 + + false + + + + false + + system + query_views_log
+ toYYYYMM(event_date) + 7500 +
+ system part_log
+ toYYYYMM(event_date) 7500 + 1048576 + 8192 + 524288 + false
- --> @@ -899,7 +1112,11 @@ system metric_log
7500 + 1048576 + 8192 + 524288 1000 + false - 60000 + 7000 + 1048576 + 8192 + 524288 + false + - + toYYYYMM(event_date) + 7500 + 1048576 + 8192 + 524288 + false + --> + + + + system + processors_profile_log
- - + toYYYYMM(event_date) + 7500 + 1048576 + 8192 + 524288 + false +
+ + + + system + asynchronous_insert_log
+ 7500 + 1048576 + 8192 + 524288 + false + event_date + event_date + INTERVAL 3 DAY +
- *_dictionary.xml + *_dictionary.*ml + + + *_function.*ml + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1152,4 +1446,48 @@ -
\ No newline at end of file + + + + + + + 1073741824 + 1024 + 1048576 + 30000000 + + + + + + \ No newline at end of file diff --git a/update/ansible/playbook/tasks/roles/clickhouse/tasks/main.yml b/update/ansible/playbook/tasks/roles/clickhouse/tasks/main.yml index 858ef5dc4f..e052e26bfc 100644 --- a/update/ansible/playbook/tasks/roles/clickhouse/tasks/main.yml +++ b/update/ansible/playbook/tasks/roles/clickhouse/tasks/main.yml @@ -42,12 +42,21 @@ enabled: no ignore_errors: true +# This will implicitly create /srv/clickhouse - name: Create clickhouse data directory file: - path: "/srv/clickhouse" + path: "/srv/clickhouse/flags" state: directory owner: root group: pmm + recurse: true + +- name: Create empty file to convert clickhouse databases from ordinary to atomic + file: + path: "/srv/clickhouse/flags/convert_ordinary_to_atomic" + state: touch + owner: root + group: pmm - name: Add ClickHouse repository yum_repository: