Sign inSign up

irfanuruchi/wmn-analyzer

By irfanuruchi

Updated 8 months ago

Image
0

1.9K

irfanuruchi/wmn-analyzer repository overview

WMN Dockerized Fog Analyzer – MQTT Analytics Service

This component is the MQTT Analyzer for the Wireless & Mobile Networks (WMN) project. It subscribes to raw wireless metrics published by edge devices, computes a wireless experience score, generates alerts for degraded conditions, and republishes the results back to MQTT.

It is intended to run on a server or home lab host (for example, a Proxmox CT/LXC or a Linux VM) alongside the edge wmn-collector.


Role in the Architecture

Typical data flow:

  • Edge: wmn-collector publishes raw metrics (latency, jitter, packet loss, RSSI when available)
  • Server/Fog: wmn-analyzer consumes raw metrics and publishes derived analytics
  • Dashboard/Storage: Grafana (cloud or self-hosted) visualizes the data

Docker Image

Docker Hub:

irfanuruchi/wmn-analyzer:latest

Supported architectures:

  • linux/amd64 – PCs, Proxmox, servers
  • linux/arm64 – ARM servers

MQTT Topics

Subscribed (input)
wmn/metrics/#

Receives raw metrics from one or more edge devices.

Published (output)
wmn/analysis/<DEVICE_ID>

Publishes computed analytics per device.


Output Message Structure

Example published message:

{
  "device_id": "irfanwmn",
  "timestamp": 1767523544,
  "analysis": {
    "wireless_score_0_100": 82,
    "alerts": [],
    "mobility_event": null
  },
  "raw": {
    "rssi_dbm": -62,
    "latency_ms_avg": 84.5,
    "jitter_ms": 44.7,
    "packet_loss_pct": 0.0
  }
}

1) Pull the image
docker pull irfanuruchi/wmn-analyzer:latest
2) Run (first time – interactive setup)
docker run -it --name wmn-analyzer \
  --restart unless-stopped \
  -v wmn_analyzer_config:/config \
  irfanuruchi/wmn-analyzer:latest

The container will prompt for:

  • MQTT broker host
  • Port (default 8883)
  • TLS enable (1 recommended)
  • MQTT username/password
  • Subscribe topic (default wmn/metrics/#)
  • Publish base (default wmn/analysis)

Configuration is saved persistently in:

/config/config.env

inside the Docker volume wmn_analyzer_config.


Container Management

Detach without stopping
Ctrl + P, then Ctrl + Q
View logs
docker logs -f wmn-analyzer
Stop / start
docker stop wmn-analyzer
docker start wmn-analyzer
Remove container (keeps config)
docker rm -f wmn-analyzer

Non-Interactive Mode (Optional)

Configuration can also be passed via environment variables.

docker run -d --name wmn-analyzer \
  --restart unless-stopped \
  -e MQTT_BROKER="xxxxxx.s1.eu.hivemq.cloud" \
  -e MQTT_PORT="8883" \
  -e MQTT_TLS="1" \
  -e MQTT_USERNAME="wmn-client" \
  -e MQTT_PASSWORD="YOUR_PASSWORD" \
  -e IN_TOPIC="wmn/metrics/#" \
  -e OUT_TOPIC_BASE="wmn/analysis" \
  -v wmn_analyzer_config:/config \
  irfanuruchi/wmn-analyzer:latest

Persistence

The analyzer uses Docker volumes to persist configuration:

  • Configuration: wmn_analyzer_config/config/config.env

This allows credentials and topic settings to survive container restarts and upgrades.


Expected Behavior

On successful startup:

[mqtt] on_connect rc=0 connected=True
[mqtt] subscribed wmn/metrics/#
[pub] wmn/analysis/<device> score=82 alerts=0 mobility=no

If no messages are published, ensure:

  • The collector is connected to the same MQTT broker
  • Topics match (wmn/metrics/#)

Notes

This service is kept lightweight and stateless (configuration is stored in a Docker volume). It can be deployed on a single host or on a separate server to separate metric collection from analytics.

Tag summary

Content type

Image

Digest

sha256:165213a30

Size

48.1 MB

Last updated

8 months ago

docker pull irfanuruchi/wmn-analyzer