Private Deployment
Decision Logs

Decision Logs

Every rule execution emits a structured decision log. The pipeline that stores and serves these logs is built around your shared object storage bucket.

How the Pipeline Works

  1. HPS and the app produce decision log entries to the Kafka logs topic after each request completes (non-blocking, post-response).
  2. Vector consumes the topic and writes the entries to your bucket under global.storage.paths.decisionLogs as compressed NDJSON, partitioned by year/month/day/hour.
  3. ClickHouse queries the archive directly. It holds no data of its own, so it runs without a persistent volume and can be restarted freely.
  4. The dashboard's native decision log search runs against ClickHouse. The archive remains plain NDJSON in your bucket, so you can also query it with your own tooling (Athena, DuckDB, and so on) or forward logs to additional sinks.

Bucket configuration and identity are covered in Storage & Backups.

Logging Values

ParameterTypeDefaultDescription
rulebricks.app.logging.enabledbooleantrueEnable decision logging
rulebricks.app.logging.kafkaBrokersstring""Kafka brokers (auto-discovered if empty)
rulebricks.app.logging.kafkaTopicstring"logs"Kafka topic for logs
rulebricks.app.logging.kafkaTopicPrefixstring"com.rulebricks."Prefix applied to all Kafka topic names; set "" to disable prefixing

The topic prefix exists so Rulebricks topics don't collide on shared or managed Kafka clusters (for example, com.rulebricks.logs). HPS prepends it to its own topics, and the chart applies it to KEDA lag triggers and the Vector consumer so everything stays in sync. CLI-generated values set it to "" for in-cluster Kafka, where the broker is dedicated.

If you run your own Kafka cluster, see External Kafka & Redis for how Vector connects to it and which ACLs it needs.

Querying with ClickHouse

Rulebricks deploys a stateless ClickHouse instance to power native decision log querying in the dashboard. All decision log data lives in the bucket; ClickHouse only queries it.

ParameterTypeDefaultDescription
clickhouse.enabledbooleantrueDeploy ClickHouse
clickhouse.auth.usernamestring"rulebricks"Query user
clickhouse.replicaCountinteger1Number of replicas
clickhouse.persistence.enabledbooleanfalseStateless by design
clickhouse.queryLimits.*objectsee valuesMemory, thread, and execution time caps

ClickHouse reads the archive through a named collection generated from global.storage.*, so no separate storage configuration is needed.

The Archive Sink

When clickhouse.enabled is on and global.storage is configured, the chart adds a decision_logs Vector sink that writes the NDJSON archive to your bucket. The key prefix uses an hourly partition layout (year=YYYY/month=MM/day=DD/hour=HH/) that must match what ClickHouse expects to query.

⚠️

The CLI generates this sink automatically; hand-installs should leave the generated partition layout intact, or ClickHouse queries will come back empty.

Forwarding to Other Destinations

Vector can forward decision logs to additional destinations alongside the archive: SIEMs, data lakes, or HTTP endpoints. The chart templates Vector's kafka source automatically (brokers, TLS/SASL, and the prefixed log topic come from a generated vector-kafka-env ConfigMap), so you only add sinks that take kafka as their input under vector.customConfig.sinks:

vector:
  customConfig:
    sinks:
      # Additional S3 sink example
      s3:
        type: aws_s3
        inputs: [kafka]
        bucket: 'your-logs-bucket'
        region: 'us-east-1'
        key_prefix: 'rulebricks/logs/%Y/%m/%d/'
        compression: gzip
        encoding:
          codec: json

See the Vector sinks documentation (opens in a new tab) for the full catalog of supported destinations.