riemann.clickhouse
Forwards riemann events to ClickHouse.
clickhouse
(clickhouse opts)
Returns a function which accepts an event and sends it to clickhouse.
Usage:
(batch 10000 5 (clickhouse {:host “play.clickhouse.com”}))
Options:
:scheme
ClickHouse URL Scheme (default: “http://”):host
ClickHouse Server IP (default: “localhost”):port
ClickHouse Server Port (default: 8123):database
ClickHouse Database Name (default: “default”):table
ClickHouse Table Name (default: “riemann”):username
ClickHouse User Name (default: “default”):password
ClickHouse Password (default: "")
It will create the clickhouse table using the following query:
CREATE TABLE IF NOT EXISTS default.riemann ( timestamp
DateTime, host
String, service
String, metric
Float32, tags
Array(String) ) ENGINE = MergeTree PARTITION BY toYYYYMM(timestamp) ORDER BY (timestamp, host, service) SETTINGS index_granularity = 8192;
generate-create-url
(generate-create-url opts)
Generates the URL to which create table query should be posted.
generate-datapoint
(generate-datapoint event)
Accepts riemann event and converts it into clickhouse datapoint.
generate-datapoint-batch
(generate-datapoint-batch events)
Accepts riemann events and converts it into clickhouse datapoint batch.
generate-insert-url
(generate-insert-url opts)
Generates the URL to which datapoint should be posted.
post-datapoint
(post-datapoint url datapoint)
Post the riemann event as clickhouse datapoint.