Skip to main content

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.

Create a Databend User

Connect to Databend server with MySQL client:

mysql -h127.0.0.1 -uroot -P3307 

Create a user:

mysql>
create user user1 identified by 'abc123';

Grant insert privileges for the user:

mysql>
grant insert on nginx.* to user1;

See also How To Create User.

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 = "user1" #Databend username
password = "abc123" #Databend password

Tutorial

How to Analyze Nginx Access Logs With Databend