ClickHouse
The ClickHouse backend is ingest-only to a ClickHouse HTTP endpoint.
Behavior and Configuration
Configuration
The following values are required when creating a ClickHouse backend:
url
: (string
, required) a valid HTTP(S) endpoint.username
: (string
, required) used for auth.password
: (string
, required) used for auth.database
: (string
, required) the database to use.port
: (number
, required) the port to use.
User Grants
The ClickHouse backend requires the following user grants:
INSERT
SELECT
CREATE TABLE
ALTER TABLE
DROP TABLE
,CREATE VIEW
DROP VIEW
note
It is suggested that you create a dedicated database and user specifically for Logflare to isolate data and permissions.
Implementation Details
The ClickHouse backend will automatically attempt to provision required tables and views after receiving the first log event.
The ingest table schema is as follows:
id
: The log eventUUID
.event_message
: The provided or generated event message of the log event, stored asString
body
: The processed log event, stored as serialized JSON in aString
column.timestamp
: Unix microsecond, stored asDateTime64(6)
Table Engine
By default, the ClickHouse backends will utilize the MergeTree
engine.
Note that when using ClickHouse Cloud, replication is handled automatically as mentioned in the data replication documentaion.