Prometheus exporter for MeshCore repeaters, read over the mesh: a companion (USB, BLE, or a companion identity in openHop over TCP) logs in to each repeater, asks for status and telemetry with direct packets and serves battery, temperature/humidity, noise floor, RSSI/SNR, packet counters, airtime and uptime on :9200/metrics. - meshcore_exporter.py: command line, MC_* environment or a TOML file with a password per repeater; --check reads every repeater once and exits; interval 1 h (min 15 min); a failed repeater is retried once after 3 min; contacts fetched once per round. - dashboards/: the Grafana dashboard, generated from generate.py (datasource, job and the rate window are variables; TX drawn above zero, RX below). - stack/: Docker Compose with Prometheus and Grafana provisioned, for a USB companion, or on the host network for openHop on the same machine. - systemd/: running without Docker. - README.md (Czech) and AGENTS.md for setting it up with an AI agent. - CI: lint and tests, gitleaks; PR check builds the image; single-platform images per architecture behind a Trivy gate (latest-<arch>, and X.Y.Z-<arch> with a release on tag vX.Y.Z); dependencies by Renovate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
1.4 KiB
YAML
39 lines
1.4 KiB
YAML
# openHop on this machine: everything on the host network, so the exporter
|
|
# reaches the openHop companion on 127.0.0.1 -- no Docker-bridge-to-host
|
|
# traffic, which host firewalls (ufw, the default nftables ruleset) block.
|
|
#
|
|
# Enable it with one line in .env:
|
|
# COMPOSE_FILE=docker-compose.yml:docker-compose.host.yml
|
|
#
|
|
# Exporter and Prometheus listen on 127.0.0.1 only; Grafana on GRAFANA_PORT
|
|
# of every interface, as in the default setup.
|
|
services:
|
|
exporter:
|
|
network_mode: host
|
|
environment:
|
|
MC_LISTEN: 127.0.0.1
|
|
MC_METRICS_PORT: "9200"
|
|
|
|
prometheus:
|
|
network_mode: host
|
|
command:
|
|
- --config.file=/etc/prometheus/prometheus.yml
|
|
- --storage.tsdb.path=/prometheus
|
|
- --storage.tsdb.retention.time=${PROMETHEUS_RETENTION:-400d}
|
|
- --web.listen-address=127.0.0.1:${PROMETHEUS_PORT:-9090}
|
|
volumes: !override
|
|
- ./host-network/prometheus.yml:/etc/prometheus/prometheus.yml:ro
|
|
- prometheus:/prometheus
|
|
|
|
grafana:
|
|
network_mode: host
|
|
ports: !reset []
|
|
environment:
|
|
GF_SERVER_HTTP_PORT: ${GRAFANA_PORT:-3000}
|
|
PROMETHEUS_PORT: ${PROMETHEUS_PORT:-9090}
|
|
volumes: !override
|
|
- ./grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro
|
|
- ./host-network/datasource.yml:/etc/grafana/provisioning/datasources/prometheus.yml:ro
|
|
- ../dashboards:/var/lib/grafana/dashboards:ro
|
|
- grafana:/var/lib/grafana
|