Skip to content

Quick Start

Monitoring consumer progress is essential in production. The fastest way to try Klag is the published Docker image.

The bare application defaults METRICS_REPORTER to none, so select prometheus, datadog, or otlp to start collection. The Helm chart defaults its reporter to prometheus.

The broker address below is a replaceable example. Set it to an address that resolves and is reachable from inside the Klag container. If Kafka runs in another container, attach both containers to the same Docker network and use the Kafka service DNS name. If Kafka is exposed by your host, use host.docker.internal:9092 on Docker Desktop.

Terminal window
docker run -e KAFKA_BOOTSTRAP_SERVERS=broker.example.com:9092 \
-e METRICS_REPORTER=prometheus \
-p 8888:8888 \
themoah/klag:latest

Metrics are then available at http://localhost:8888/metrics.

Native image (faster startup, lower memory)

Section titled “Native image (faster startup, lower memory)”

A GraalVM native build is published alongside the JVM image, tagged :native and :<version>-native:

Terminal window
docker run -e KAFKA_BOOTSTRAP_SERVERS=broker.example.com:9092 \
-e METRICS_REPORTER=prometheus \
-p 8888:8888 \
themoah/klag:native

The native binary starts in ~70–100 ms using ~44 MB RSS, versus ~500 ms / ~119 MB for the JVM image, ideal for fast scaling and low-footprint deployments. Same config, endpoints, and metrics. See Native Image for build details.

Once running, Klag exposes:

Endpoint Purpose
/healthz Liveness probe (always 200).
/readyz Readiness probe (200 if Kafka UP, 503 if DOWN).
/metrics Prometheus scrape endpoint (when enabled).
/version Build information.
/mcp MCP endpoint for AI agents (when MCP_ENABLED=true).