Skip to content

Latest commit

 

History

History
93 lines (66 loc) · 3.57 KB

File metadata and controls

93 lines (66 loc) · 3.57 KB

rxtx data transmission Release CI codecov Go Report Card OpenSSF Scorecard ghcr.io

Rtbeat

Rtbeat is an Elastic Beat that receives HTTP POST data from rxtx and publishes each message as a Beats event into Elasticsearch, Logstash, Kafka, Redis, or directly to log files.

It runs a small HTTP server (default port 8081):

  • POST /in — accepts an rxtx MessageBatch JSON body; every message in the batch is republished as a Beats event with the original payload under rxtxMsg, plus clientIp and type.
  • GET /metrics — Prometheus metrics (rtbeat_batches_received, rtbeat_messages_parsed, rtbeat_acks_received, rtbeat_current_acks).

Requirements

  • Go 1.26 or greater (module-based; no GOPATH layout required).

Build

make build          # CGO_ENABLED=0 go build -o rtbeat .
# or
go build -o rtbeat .

Run

./rtbeat -c rtbeat.yml -e -d "*"

rtbeat.yml configures the listen port and the Elastic output. See rtbeat.reference.yml for the full set of libbeat output and processor options.

Docker

docker run --rm -p 8081:8081 -v "$PWD/rtbeat.yml:/rtbeat.yml" \
  ghcr.io/txn2/rtbeat -c /rtbeat.yml -e

Develop

Run the same checks CI runs before pushing:

make verify   # check-go-version + tidy-check + lint + test + validate-actions

Individual targets: make lint, make test, make build, make tidy. See CONTRIBUTING.md.

Dependency notes

rtbeat is built on Elastic libbeat v7.17.29. libbeat relies on a set of replace directives in its own go.mod; because Go modules do not apply a dependency's replaces transitively, those are mirrored into this module's go.mod. The txn2/rxtx message type and its 2018-era transitive dependencies (coreos/bbolt, satori/go.uuid) are pinned to specific commits so the wire format and compilation stay stable. Do not bump these casually — make tidy-check will flag drift.

Releasing

Releases are built by GoReleaser on tag push (v*) via GitHub Actions, producing signed (Cosign, keyless) archives with SBOMs and SLSA provenance, plus multi-arch Docker images. To cut a release:

git tag -a v1.2.3 -m "Version 1.2.3"
git push origin v1.2.3

Resources

License

Apache 2.0 — see LICENSE.