From c6cb4cae00b258decc9ecd1d2be63a59a08c2a76 Mon Sep 17 00:00:00 2001 From: Cort Buffington Date: Sun, 12 Jul 2026 13:42:17 -0500 Subject: [PATCH] docs: document the Unix-socket feed and per-repeater ping-loss * README/INSTALL: REPORT_TRANSPORT/REPORT_SOCKET for a same-host dashboard over a Unix socket (immune to NIC flaps / conntrack eviction), and the matching DMRLINK_TRANSPORT/DMRLINK_SOCKET on the dashboard side. * README: note the per-repeater ping-loss figure (PING_LOSS_WINDOW / PING_LOSS_WARN) the dashboard now shows. * dashboard/config_sample.py: add DMRLINK_TRANSPORT / DMRLINK_SOCKET. Co-Authored-By: Claude Opus 4.8 --- INSTALL.md | 9 +++++++-- README.md | 18 ++++++++++++++---- dashboard/config_sample.py | 6 ++++-- 3 files changed, 25 insertions(+), 8 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 40284d0..ad77c1d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -49,7 +49,9 @@ cp dmrlink-SAMPLE.cfg dmrlink.cfg Edit `dmrlink.cfg` and fill in at minimum: - **[REPORTS]** — set `REPORT_NETWORKS: NETWORK`, `REPORT_PORT`, and - `REPORT_CLIENTS` if you will run the dashboard or any external monitoring. + `REPORT_CLIENTS` if you will run the dashboard or any external monitoring. For a + same-host dashboard, use `REPORT_TRANSPORT: unix` with a `REPORT_SOCKET` path + instead of a TCP port (immune to NIC flaps / conntrack eviction). - **[LOGGER]** — choose log handlers and level. Use `console-timed` for foreground testing; `file-timed` or `syslog` for production. - **System stanzas** — one `[SECTION]` block per IPSC network. @@ -89,7 +91,10 @@ cp dashboard/config_sample.py dashboard/config.py Edit `dashboard/config.py`: -- `DMRLINK_IP` / `DMRLINK_PORT` — point at dmrlink3's `REPORT_PORT`. +- `DMRLINK_IP` / `DMRLINK_PORT` — point at dmrlink3's `REPORT_PORT` (TCP transport). +- `DMRLINK_TRANSPORT` / `DMRLINK_SOCKET` — set to `'unix'` and the daemon's + `REPORT_SOCKET` path for a same-host feed over a Unix socket (must match the + daemon's `REPORT_TRANSPORT`); leave as `'tcp'` for a remote dashboard. - `WEB_PORT` — port the dashboard web server listens on (default `8080`). - `PATH` — directory containing alias files (`peer_ids.json`, etc.). - `LAST_HEARD` / `LAST_HEARD_COUNT` — default state (`'open'`/`'closed'`/`'off'`) diff --git a/README.md b/README.md index 155b2ad..3876aad 100644 --- a/README.md +++ b/README.md @@ -145,13 +145,23 @@ Enable reporting in `dmrlink.cfg`: ```ini [REPORTS] REPORT_NETWORKS: NETWORK -REPORT_PORT: 4321 -REPORT_CLIENTS: 127.0.0.1 +REPORT_TRANSPORT: tcp ; 'tcp' (default) or 'unix' +REPORT_PORT: 4321 ; used when REPORT_TRANSPORT = tcp +REPORT_SOCKET: /tmp/dmrlink3-report.sock ; used when REPORT_TRANSPORT = unix +REPORT_CLIENTS: 127.0.0.1 ; TCP only ``` +When the dashboard runs on the **same host**, set `REPORT_TRANSPORT: unix` (and a +`REPORT_SOCKET` path) so the feed rides a local Unix-domain socket instead of TCP — +a same-box socket can't be broken by a NIC flap or connection-tracking eviction. +Set the dashboard's matching `DMRLINK_TRANSPORT`/`DMRLINK_SOCKET` to the same. Use +`tcp` (the default) for a remote dashboard. + The dashboard connects to this feed and serves a browser UI at the configured -`WEB_PORT`. See `dashboard/config_sample.py` and [INSTALL.md](INSTALL.md) for -setup instructions. +`WEB_PORT`. It also shows a per-repeater **ping-loss** figure (golds a row whose +keepalive-loss share crosses `PING_LOSS_WARN`), controlled by `PING_LOSS_WINDOW` / +`PING_LOSS_WARN` in `[GLOBAL]`. See `dashboard/config_sample.py` and +[INSTALL.md](INSTALL.md) for setup instructions. **Demo mode** — append `?demo` to the dashboard URL (e.g. `http://localhost:8080/?demo`) to load a static pre-populated scenario showing all visual elements: MASTER and PEER diff --git a/dashboard/config_sample.py b/dashboard/config_sample.py index c021444..e424615 100644 --- a/dashboard/config_sample.py +++ b/dashboard/config_sample.py @@ -14,8 +14,10 @@ REPORT_NAME = 'My DMRlink3 System' # Shown in the dashboard header LOGO_FILE = '' # Path to a logo image (png/jpg/svg/gif); '' = no logo # Connection to dmrlink3's reporting feed ([REPORTS] in dmrlink.cfg) -DMRLINK_IP = '127.0.0.1' # dmrlink3 reporting host -DMRLINK_PORT = 4321 # dmrlink3 REPORT_PORT +DMRLINK_TRANSPORT = 'tcp' # 'tcp' (default) or 'unix'; must match the daemon's REPORT_TRANSPORT +DMRLINK_IP = '127.0.0.1' # dmrlink3 reporting host (tcp transport) +DMRLINK_PORT = 4321 # dmrlink3 REPORT_PORT (tcp transport) +DMRLINK_SOCKET = '/tmp/dmrlink3-report.sock' # daemon's REPORT_SOCKET path (unix transport) # Web server WEB_HOST = '0.0.0.0' # Interface to bind the dashboard