format

Selects a rendered INSERT statement or newline-delimited JSONEachRow.

This parameter applies to omclickhouse: ClickHouse Output Module.

Name:

format

Scope:

action

Type:

word

Default:

values

Required?:

no

Introduced:

not specified

Description

values posts the rendered template as the HTTP body. That body must contain INSERT INTO. In bulk mode the module still joins statements on the VALUES clause. This is the historical behavior.

jsoneachrow posts one JSON object per event, separated by newlines, with Content-Type: application/x-ndjson. The INSERT statement is the query URL parameter: INSERT INTO <table> FORMAT JSONEachRow. A template is required. A list template with option.jsonf="on" renders one escaped object per event. option.sql, option.stdsql, and option.json are rejected because they would escape the object’s own quotes. table is required.

Action usage

module(load="omclickhouse")
template(name="ClickHouseJson" type="list" option.jsonf="on") {
    property(outname="message" name="msg" format="jsonf")
}
action(type="omclickhouse" format="jsoneachrow" table="rsyslog.events"
       template="ClickHouseJson")

YAML usage

actions:
  - type: omclickhouse
    format: jsoneachrow
    table: rsyslog.events
    template: ClickHouseJson

See also

See also omclickhouse: ClickHouse Output Module.


Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project

Contributing: Source & docs: rsyslog source project

© 2008–2026 Rainer Gerhards and others. Licensed under the Apache License 2.0.