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

Commit

Permalink
Clickhouse query thread log (#100)
Browse files Browse the repository at this point in the history
* add clickhouse_query_thread_log

Co-authored-by: Maksim <[email protected]>
  • Loading branch information
hruljov and Maksim authored Jul 26, 2022
1 parent e80abfd commit 751c706
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ F: you can manage ttl query_log:
```yaml
clickhouse_query_log_ttl: 'event_date + INTERVAL 7 DAY DELETE'
```
F: you can manage ttl query_thread_log:
```yaml
clickhouse_query_thread_log_ttl: 'event_date + INTERVAL 7 DAY DELETE'
```
F: Or you can specify ips directly e.g. to listen on all ipv4 and ipv6 addresses:
```yaml
Expand Down Expand Up @@ -252,6 +256,7 @@ Including an example of how to use your role (for instance, with variables passe
dbs: [ testu1,testu2,testu3 ] ,
comment: "classic user with multi dbs and multi-custom network allow password"}
clickhouse_query_log_ttl: 'event_date + INTERVAL 7 DELETE'
clickhouse_query_thread_log_ttl: 'event_date + INTERVAL 7 DELETE'
clickhouse_dicts:
test1:
name: test_dict
Expand Down
3 changes: 3 additions & 0 deletions templates/config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@
<database>system</database>
<table>query_thread_log</table>
<partition_by>toYYYYMM(event_date)</partition_by>
{% if clickhouse_query_thread_log_ttl is defined %}
<ttl>{{ clickhouse_query_thread_log_ttl }}</ttl>
{% endif %}
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</query_thread_log>

Expand Down

0 comments on commit 751c706

Please sign in to comment.