diff --git a/ops/nixos/bvm-logger/clickhouse-config.xml b/ops/nixos/bvm-logger/clickhouse-config.xml new file mode 100644 index 0000000000..927b31f867 --- /dev/null +++ b/ops/nixos/bvm-logger/clickhouse-config.xml @@ -0,0 +1,185 @@ + + + + + critical + 1 + 1000M + 10 + + + 8123 + 9000 + 9009 + + :: + + 4096 + + 3 + + 100 + 0 + 10000 + 0.9 + 4194304 + 0 + 8589934592 + 5368709120 + 1000 + 134217728 + 10000 + /var/lib/clickhouse/ + /var/lib/clickhouse/tmp/ + /var/lib/clickhouse/user_files/ + + + + users.xml + + + + /var/lib/clickhouse/access/ + + + default + + default + true + false + 3600 + 3600 + 60 + + + + + /metrics + 0 + + true + true + true + true + + + + system + query_log
+ toYYYYMM(event_date) + event_date + INTERVAL 30 DAY DELETE + 7500 +
+ + system + text_log
+ 7500 + event_date + INTERVAL 30 DAY DELETE + trace +
+ + system + trace_log
+ + toYYYYMM(event_date) + event_date + INTERVAL 30 DAY DELETE + 7500 +
+ + system + query_thread_log
+ toYYYYMM(event_date) + event_date + INTERVAL 30 DAY DELETE + 7500 +
+ + system + metric_log
+ 7500 + 1000 +
+ + system + asynchronous_metric_log
+ 7000 +
+ + + system + crash_log
+ + + 1000 +
+ + + + + + + + *_dictionary.xml + + + /var/lib/clickhouse/format_schemas/ + + + + + hide encrypt/decrypt arguments + ((?:aes_)?(?:encrypt|decrypt)(?:_mysql)?)\s*\(\s*(?:'(?:\\'|.)+'|.*?)\s*\) + + \1(???) + + + + + + + + false + + false + + + https://6f33034cfe684dd7a3ab9875e57b1c8d@o388870.ingest.sentry.io/5226277 + +
diff --git a/ops/nixos/bvm-logger/default.nix b/ops/nixos/bvm-logger/default.nix index 5d4f9cf193..7ce449b7be 100644 --- a/ops/nixos/bvm-logger/default.nix +++ b/ops/nixos/bvm-logger/default.nix @@ -29,6 +29,14 @@ in { my.ip.tailscale = "100.68.134.82"; services.clickhouse.enable = true; + services.clickhouse.package = pkgs.symlinkJoin { + name = "clickhouse-overridden"; + paths = [ pkgs.clickhouse ]; + postBuild = '' + rm $out/etc/clickhouse-server/config.xml + cp ${./clickhouse-config.xml} $out/etc/clickhouse-server/config.xml + ''; + }; time.timeZone = "Etc/UTC"; systemd.services.journal2clickhouse = {