Skip to main content
Version: 0.16.0

Ingestion Mode

Ingestion mode is a light Prisme Analytics mode for handling and ingesting events.

It integrates solely with ClickHouse.

Overview

Configuration Options

Configuration of your instance is done by setting PRISME_<option name> environment variable.

Web Server

Prisme has 2 logs, an access logs for processed requests and a general logs for everything else.

All logs are structured JSON that follows bunyan format.

You can pipe logs to bunyan CLI to pretty print them.

Access Log

Path to access log file.

Default: PRISME_ACCESS_LOG=/dev/stdout

Port

Web server listening TCP port.

Default: PRISME_PORT=80

API Endpoints Timeout

Duration before handlers timeout on /api/* endpoints.

Default: PRISME_API_EVENTS_TIMEOUT=3s

Administration Server

Since v0.15.0, Prisme is able to collect and expose it's metrics on the newly added administration interface.

Host Port

<host>:<port> string on which administration server will listen.

Default: PRISME_ADMIN_HOSTPORT=127.0.0.1:9090 (PRISME_ADMIN_HOSTPORT="0.0.0.0:9090" in Docker)

Proxy Options

Prisme Analytics can be positioned behind a reverse proxy, and this section provides information on options related to the proxy setup. It's important to note that a misconfigured server can have security implications. Hence, Prisme Analytics prioritizes security by default with carefully chosen default values.

Trust Proxy

Whether X-Forwarded-For, X-Request-Id and other proxy related headers should be trusted. Sets this value to true only if your instance is running behind a proxy.

Default: PRISME_TRUST_PROXY=false

Proxy Header

HTTP header used to detemine client IP address when Prisme Analytics is placed behind a trusted proxy.

Default: PRISME_PROXY_HEADER=X-Forwarded-For

ClickHouse Options

Secure connection

Use a TLS connection for ClickHouse.

Default: PRISME_CLICKHOUSE_TLS=false

Host And Port

<host>:<port> string pointing to a ClickHouse instance.

Example: PRISME_CLICKHOUSE_HOSTPORT=clickhouse.localhost:9000
This options is mandatory.

Database

ClickHouse database to use.

Default: PRISME_CLICKHOUSE_DATABASE=prisme

Origin Registry Options

Origins

Comma separated list (without whitespace) of valid origins. Events coming from an invalid source are rejected.

Example: PRISME_SOURCE_REGISTRY_SOURCE=www.example.com,app.example.com

Event Store Options

Event store is responsible of storing events efficiently in ClickHouse.

ClickHouse recommend keeping number of insertions to 1 per seconds max and inserting rows per batch of tens of thousands.

Maximum Batch Size

Maximum size of an events batch before it is sent to ClickHouse. Leave as default unless you have high traffic load.

Default: PRISME_EVENTSTORE_MAX_BATCH_SIZE=4096

Maximum Batch Timeout

Maximum duration before current batch is sent to event store.

Default: PRISME_EVENTSTORE_MAX_BATCH_TIMEOUT=1m