Using Databend as a Sink for Vector
What is Vector?
- A lightweight, ultra-fast tool for building observability pipelines.
- Allows you to Gather, Transform, and Route all log and metric data with one simple tool.
- Made up of three components (sources, transforms, sinks) of two types (logs, metrics).
Databend supports ClickHouse REST API, so it's easy to integration with Vector to stream, aggregate, and gain insights.
Configure Vector
To use Databend with Vector you will need to configure for Clickhouse Sink:
[sinks.databend_sink]
type = "clickhouse"
inputs = [ "my-source-or-transform-id" ] # input source
database = "mydatabase" #Your database
table = "mytable" #Your table.
endpoint = "http://localhost:8000/clickhouse" #Databend ClickHouse REST API: http://{http_handler_host}:{http_handler_port}/clickhouse
compression = "gzip"
[sinks.databend_sink.auth]
strategy = "basic"
user = "vector" #Databend username
password = "vector123" #Databend password
Create a User for Vector
Connect to Databend server with MySQL client:
mysql -h127.0.0.1 -uroot -P3307
mysql>
create user 'vector' identified by 'vector123';
Please replace vector
, vector123
to your own username and password.
mysql>
grant insert on nginx.* TO 'vector'@'%';