Help us shape the future of Go! Take the 2026 Go Developer Survey

kafkaspectre

module
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2026 License: MIT

README

kafkaspectre

CI ANCC

kafkaspectre — Kafka cluster auditor for unused topics and drift. Part of SpectreHub.

What it is

  • Connects to Kafka and identifies unused, orphaned, and misconfigured topics
  • Scans code repositories for topic references and compares against live cluster state
  • Risk-scores cleanup recommendations by partition count and replication factor
  • Flags topics whose only consumer groups are abandoned — no live members
  • Classifies stale topics — consumers exist but are falling behind on lag
  • Baseline mode — snapshot once, report only what changed on subsequent runs
  • Config risk assessment — flags under-replicated, infinite-retention, and weak-durability topics
  • Refuses to recommend deleting Schema Registry, Connect, and other managed topics
  • Outputs text, JSON, SARIF, and SpectreHub formats

What it is NOT

  • Not a monitoring dashboard — point-in-time auditor
  • Not a consumer lag alerting system — it reports lag to classify stale topics, but does not alert on it
  • Not a topic management UI
  • Not a replacement for Kafka's built-in admin tools

Quick start

Homebrew
brew tap ppiankov/tap
brew install kafkaspectre
Windows

Download the kafkaspectre_<version>_windows_<arch>.zip archive from the releases page, extract it, and put kafkaspectre.exe somewhere on your PATH.

From source
git clone https://github.com/ppiankov/kafkaspectre.git
cd kafkaspectre
make build
Usage
kafkaspectre audit --bootstrap-server localhost:9092 --output json

CLI commands

Command Description
kafkaspectre audit Audit cluster for unused and misconfigured topics
kafkaspectre check Compare code topic references against live cluster
kafkaspectre version Print version

SpectreHub integration

kafkaspectre feeds Kafka cluster findings into SpectreHub for unified visibility across your infrastructure.

spectrehub collect --tool kafkaspectre

Safety

kafkaspectre operates in read-only mode. It inspects and reports — never modifies, deletes, or alters your topics.

Documentation

Document Contents
CLI Reference Full command reference, flags, and configuration

License

MIT — see LICENSE.


Built by Obsta Labs

Directories

Path Synopsis
cmd
kafkaspectre command
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL