Last Updated: 2026-02-02
Elastic Machinebeat is a custom beat for industrial protocols (OPC UA, MQTT, PLC4X). Goal: modernize dependencies and target Beats v9.x.
- Branch: master
- Target: Beats v9.2.4 (aligned with elastic/beats v9 branch)
- Changes:
go.modadjusted to target Beats v9 (using pseudo-versionv7.0.0-alpha2...mapped to v9.2.4 commitfd909e2bd441).replacedirectives aligned with Beats v9.- Source code imports updated:
github.com/elastic/beats/v7/libbeat/logp->github.com/elastic/elastic-agent-libs/logp(moved in v9). go.sumupdated viago mod tidy.
| Component | go.mod Version |
|---|---|
| Go | 1.24.11 (Toolchain: 1.24.12) |
| libbeat | v7.0.0-alpha2... (v9.2.4 commit fd909e2) |
| elastic-agent-libs | v0.26.2 |
| paho.mqtt | v1.5.1 |
| golang.org/x/tools | v0.40.0 |
- ✅ SUCCESS:
go mod tidycompleted successfully. Dependencies are resolved. - ❌ Build:
go build ./...fails:common.MapStrundefined inmodule/mqtt/topic/client.goandmodule/opcua/nodevalue/nodevalue.go. ⚠️ magenot installed (optional).
- Adjust
go.modfor Beats v9.x target. - Run
go mod tidysuccessfully. - Fix
libbeat/logpimport paths.
- Fix
common.MapStrusage (replace with v9 equivalent, e.g.mapstr.Mfromelastic-agent-libs/mapstr). - Re-run
go build/mage build.
go.moduses a pseudo-version forbeats/v7and areplacedirective to point to the v9 commit, becausebeatsv9 still declaresv7module path but tags arev9.x.x.libbeat/logpmoved toelastic-agent-libs/logp, requiring code changes.