Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 751c706

Browse files
hruljovMaksim
and
Maksim
authored
Clickhouse query thread log (#100)
* add clickhouse_query_thread_log Co-authored-by: Maksim <[email protected]>
1 parent e80abfd commit 751c706

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ F: you can manage ttl query_log:
3131
```yaml
3232
clickhouse_query_log_ttl: 'event_date + INTERVAL 7 DAY DELETE'
3333
```
34+
F: you can manage ttl query_thread_log:
35+
```yaml
36+
clickhouse_query_thread_log_ttl: 'event_date + INTERVAL 7 DAY DELETE'
37+
```
3438
3539
F: Or you can specify ips directly e.g. to listen on all ipv4 and ipv6 addresses:
3640
```yaml
@@ -252,6 +256,7 @@ Including an example of how to use your role (for instance, with variables passe
252256
dbs: [ testu1,testu2,testu3 ] ,
253257
comment: "classic user with multi dbs and multi-custom network allow password"}
254258
clickhouse_query_log_ttl: 'event_date + INTERVAL 7 DELETE'
259+
clickhouse_query_thread_log_ttl: 'event_date + INTERVAL 7 DELETE'
255260
clickhouse_dicts:
256261
test1:
257262
name: test_dict

templates/config.j2

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,9 @@
291291
<database>system</database>
292292
<table>query_thread_log</table>
293293
<partition_by>toYYYYMM(event_date)</partition_by>
294+
{% if clickhouse_query_thread_log_ttl is defined %}
295+
<ttl>{{ clickhouse_query_thread_log_ttl }}</ttl>
296+
{% endif %}
294297
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
295298
</query_thread_log>
296299

0 commit comments

Comments
 (0)