Eventum Logo

Eventum

Output

clickhouse

Output plugin that inserts events into a ClickHouse table via the HTTP interface.

Inserts events into a ClickHouse table using the HTTP interface. Supports configurable input formats, DSN connection strings, and TLS.

Parameters

ParameterTypeDefaultConstraintsDescription
hoststringRequired. Non-empty.ClickHouse server hostname or IP.
portinteger81231–65535HTTP/HTTPS port.
protocolstring"http""http" or "https"Connection protocol.
databasestring"default"Non-empty.Target database.
tablestringRequired. Non-empty.Target table.
usernamestring"default"Non-empty.Authentication username.
passwordstring""Authentication password.
dsnClickHouse DSN or nullnullDSN string (e.g., clickhouse+native://user:pass@host:9000/db). Overrides individual connection fields.
connect_timeoutinteger10>= 1Connection timeout in seconds.
request_timeoutinteger300>= 1Full request timeout in seconds.
client_namestring or nullnullNon-empty if set.Client name for the ClickHouse query log.
verifybooleantrueWhether to verify the server's TLS certificate.
ca_certpath or nullnullNon-empty if set.Path to CA certificate file.
client_certpath or nullnullNon-empty if set.Path to client certificate. Must be provided together with client_cert_key.
client_cert_keypath or nullnullNon-empty if set.Path to client certificate key. Must be provided together with client_cert.
server_host_namestring or nullnullNon-empty if set.Expected server hostname in the TLS certificate.
tls_modestring or nullnull"proxy", "strict", or "mutual"TLS verification mode.
proxy_urlURL or nullnullValid HTTP/HTTPS URL.Proxy address.
input_formatstring"JSONEachRow"Valid ClickHouse input format.ClickHouse input format for the INSERT query.
headerstring""String prepended before all events in each batch.
footerstring""String appended after all events in each batch.
separatorstring"\n"String inserted between events.
formatterformatterjsonHow events are serialized before insertion.

Behavior

  • Events are sent via ClickHouse's raw insert API using the specified input_format.
  • The default combination of json formatter + JSONEachRow input format sends one JSON object per line.
  • For non-JSON formats (CSV, TabSeparated, etc.), use header, footer, and separator to control event wrapping and the plain formatter.
  • Connection via DSN overrides individual host, port, protocol, database, username, and password fields.

Examples

Basic JSONEachRow insertion:

output:
  - clickhouse:
      host: clickhouse.example.com
      database: analytics
      table: events
      username: ${params.ch_user}
      password: ${secrets.ch_password}

HTTPS with custom port:

output:
  - clickhouse:
      host: clickhouse.prod
      port: 8443
      protocol: https
      database: analytics
      table: events
      verify: true
      input_format: JSONEachRow

Via DSN string:

output:
  - clickhouse:
      dsn: clickhouse+native://admin:secret@clickhouse.prod:9000/analytics
      table: events

CSV input format with plain formatter:

output:
  - clickhouse:
      host: localhost
      table: events
      input_format: CSV
      separator: "\n"
      formatter:
        format: plain

On this page