The output for filebeat support push events to ClickHouse,You need to recompile filebeat with the ClickHouse Output.
git clone git@github.com:elastic/beats.git
go get -u github.com/rlynic/filebeat-output-clickhouse
cd {your beats directory}/github.com/elastic/beats/libbeat/publisher/includes/includes.go
import (
...
_ "github.com/rlynic/filebeat-output-clickhouse"
)
cd {your beats directory}/github.com/elastic/beats/filebeat
make
#----------------------------- ClickHouse output --------------------------------
output.clickHouse:
# clickHouse tcp link address
# https://github.com/ClickHouse/clickhouse-go
# example tcp://host1:9000?username=user&password=qwerty&database=clicks&read_timeout=10&write_timeout=20&alt_hosts=host2:9000,host3:9000
url: "tcp://127.0.0.1:9000?debug=true"
# table name for receive data
table: ck_test
# table columns for data filter, match the keys in log file
columns: ["id", "name", "created_date"]
# will sleep the retry_interval seconds when unexpected exception, default 60s
retry_interval: 60
# whether to skip the unexpected type row, when true will skip unexpected type row, default false will always try again
skip_unexpected_type_row: false