modbus-server v2.2.0 — Release Notes
Release date: 2026-02-21
Summary
v2.2.0 introduces telemetry and Prometheus-compatible metrics, expands testing around the telemetry stack, updates examples and documentation, and applies linting and small persistence fixes. This release adds runtime metrics (CPU, memory, load average, and read/write counters) and exposes a metrics endpoint for scraping.
Highlights
- New telemetry package exposing a Prometheus-format metrics endpoint.
- Collection of system and application metrics (CPU, memory, load average, read/write counters).
- Integration of metrics wiring into the Modbus TCP server and configuration.
- New unit tests and test coverage for telemetry components.
- Example configurations and documentation updates demonstrating metrics usage.
- Linter/pre-commit updates and code cleanups.
- Docker images updated to expose the metrics endpoint port.
Files / Components Changed (high level)
- Telemetry
src/app/lib/telemetry/metrics_datastore.py(new/modified)src/app/lib/telemetry/metrics_server.py(new/modified)src/app/lib/telemetry/prometheus_metrics.py(new/modified)src/app/lib/telemetry/__init__.py(added)
- Server integration
src/app/modbus_server.py(metrics wiring and endpoint integration)src/app/modbus_server.json(configuration updates)
- Tests
tests/test_metrics_datastore.py(added)tests/test_metrics_server.py(added)tests/test_prometheus_metrics.py(added)- other test updates under
tests/
- Examples & docs
examples/metrics_example.txt(added)- updated JSON examples in
examples/ README.md(metrics documentation updates)
- Persistence
src/app/lib/register_persistence/__init__.py(tweaks)
- Packaging & CI
src/requirements.txt(ensure runtime deps e.g.,psutil).pre-commit-config.yaml(linting updates)
- Containers
DockerfileandDockerfile.test(expose metrics port)
Upgrade notes
- Dependencies: confirm
psutiland any other telemetry-related packages are present insrc/requirements.txtbefore packaging or deploying. - Configuration:
src/app/modbus_server.jsoncontains new settings for the metrics endpoint (port/path). Review and merge these into runtime configs as needed. - Docker: containers now expose the metrics port; update your deployment manifests and firewall rules to allow scraping if required.
Usage / Verification
- Run tests:
pytest- Verify the metrics endpoint (address and port per
modbus_server.json) returns Prometheus-compatible metrics. The default path and port are documented inREADME.md.
Backwards compatibility
No breaking API changes to Modbus register handling are expected with v2.2.0. The metrics subsystem is additive and disabled unless configured/enabled in modbus_server.json.
Contributors
Contributors are reflected in the commit history for this branch; see commits listed above for details.