go-stash consumes Kafka topics, filters and reshapes events, and bulk-writes them into Elasticsearch indexes.
Overview
go-stash is a server-side data processing pipeline that reads messages from Kafka, applies configured filters, and sends processed documents to Elasticsearch. It targets log and event ingestion scenarios similar in role to Logstash in ELK-style stacks.
Deployment is a single executable, with optional Docker runs driven by a YAML configuration file. Input settings tune Kafka connections, consumer threads, fetch sizes, and whether to start from earliest or latest offsets. Processor thread counts scale with available CPU cores.
Filters can drop messages matching field rules, remove fields, or rename keys before output. Output configures index naming patterns, bulk chunk sizes, compression, timezone, and a graceful shutdown window to drain in-flight data.
The implementation relies on the go-zero stack for performance. Published benchmarks compare throughput favorably against Logstash under described hardware setups.
Key features
- Kafka consumer input
- Elasticsearch bulk output
- YAML pipeline configuration
- Drop, rename, and field filters
- Configurable index naming
- Graceful shutdown drain
- Single binary deployment
- Docker deployment option
Use cases
- ELK-style log shipping
- Kafka event indexing
- High-throughput log parsing
- Replacing heavier ingest agents