This plugin is a modified version of the Lucidworks logstash json_batch. That plugin is available here.
It has been modified to support ClickHouse JSON Format, but also supports fault tolerance.
Please note that the name of the plugin when used is clickhouse
, it only supports json in its current form. If further output formats are added in the future, this might change back to json_batch.
output {
clickhouse {
headers => ["Authorization", "Basic YWRtaW46cGFzc3dvcmQxMjM="]
http_hosts => ["http://your.clickhouse1/", "http://your.clickhouse2/", "http://your.clickhouse3/"]
table => "table_name"
mutations => {
"to1" => "from1"
"to2" => [ "from2", "(.)(.)", '\1\2' ]
}
}
}
save_on_failure
(default: true) - enable / disable request body save on failuresave_dir
(default: /tmp) - directory where failed request body will be savedautomatic_retries
(default: 1) - number of connect retry attempts to each host in http_hosts
request_tolerance
(default: 5) - number of http request send retry attempts if response status code is not 200backoff_time
(default: 3) - time to wait in seconds for next retry attempt of connect or requestDefault batch size is 50, with a wait of at most 5 seconds per send. These can be tweaked with the parameters flush_size
and idle_flush_time
respectively.
The easiest way to use this plugin is by installing it through rubygems like any other logstash plugin. To get the latest versio installed, you should run the following command: bin/logstash-plugin install logstash-output-clickhouse
To build the gem yourself, use gem build logstash-output-clickhouse.gemspec
in the root of this repository. Alternatively, you can download a built version of the gem from the dist
branch of this repository.
To install, run the following command, assuming the gem is in the local directory: $LOGSTASH_HOME/bin/plugin install logstash-output-clickhouse-X.Y.Z.gem
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。