/klag:klagfrom klag
Installs, configures, deploys, and troubleshoots Klag, a Kafka consumer lag exporter. Covers Docker, Helm, ArgoCD/Flux, native image, MCP endpoint setup, and metric interpretation.
Ships in klag. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Klag exports Kafka consumer lag and group health to Prometheus, Datadog or OTLP. It is
read-only against Kafka: it needs DESCRIBE on the cluster, on topics, and on groups, nothing
more. Cluster DESCRIBE is required even when group filtering is on — listConsumerGroups()
runs before the filter. Details: references/kafka-connect.md.
Your pre-trained knowledge of Klag's flags and metric names may be outdated. Prefer retrieval. The docs corpus is machine-readable:
https://klag.dev/llms.txt — page indexhttps://klag.dev/llms-full.txt — full corpus, one fetchhttps://klag.dev/configuration/reference/Fetch the relevant page before quoting an env var, a chart value or a metric name.
METRICS_REPORTER defaults to none. Without prometheus, datadog or otlp,
/metrics is empty and the MCP snapshot is never populated. Nothing errors — it is
just silent. Check this first when a fresh install reports no data.KAFKA_BOOTSTRAP_SERVERS defaults to localhost:9092. In a container or a pod
that is almost never right.Every setting is an env var. Resolution order, first non-blank wins:
NAME env var → JVM -DNAME → dotted -Dname.dotted (HTTP_PORT → -Dhttp.port).
Any KAFKA_X_Y_Z env var is lowercased and mapped to the AdminClient property
kafka.x.y.z, so the whole Kafka client surface is reachable without first-class support
(KAFKA_SASL_JAAS_CONFIG → sasl.jaas.config). Exceptions: KAFKA_CLUSTERS and
KAFKA_CLUSTER_NAME are process settings, not AdminClient keys.
KAFKA_CLUSTERS is a JSON array of clusters scraped in one process (name +
bootstrapServers required; unique names). Helm: kafka.clusters. Do not run N
Deployments for that. Kafka series carry cluster_name. KAFKA_CLUSTER_NAME tags a
singleton and is ignored when KAFKA_CLUSTERS is set. Process KAFKA_* SASL/SSL are
shared defaults (Helm: kafka.existingSecret). Do not put secrets in per-cluster
properties. MCP still sees the first cluster only.
/readyz is 200 if any cluster is up.
File config layers under env vars:
classpath application.properties < KLAG_CONFIG_FILE < KAFKA_* env vars.
Full list: https://klag.dev/configuration/reference/.
| Path | Use |
|---|---|
/healthz | liveness, always 200 |
/readyz | 200 when any configured Kafka cluster is up, 503 when all are down |
/metrics | Prometheus scrape (when METRICS_REPORTER=prometheus) |
/version | build info |
/mcp | MCP for AI agents, when MCP_ENABLED=true |
references/deploy-targets.md — docker, compose demo, Helm, GitOps, native/jar; exact commands.references/kafka-connect.md — bootstrap discovery, SASL/TLS matrix, ACLs, Confluent/Strimzi/MSK.MCP_AUTH_TOKEN go into a
Kubernetes Secret (kafka.existingSecret, mcp.existingSecret) — never into a values.yaml
inside a git worktree. --set mcp.authToken=..., docker run -e MCP_AUTH_TOKEN=... and
claude mcp add --header "...token..." all leave the value somewhere readable afterwards
(Helm release, container config, shell history / process list). Use them only for a throwaway
POC, pass the value through a shell variable, and say which of these you used.kubectl apply.prod|production|prd as production: say so and ask again.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub themoah/klag --plugin klagOther plugins' skills for the same job