Skip to main content

Woninet

PyPI version Python License Downloads

A local network monitoring system.

Woninet detects network hosts, tracks their availability, and measures latency, packet loss, and jitter. It continuously collects metrics and evaluates configurable alert rules in real time.

Woninet dashboard

Table of Contents

Features

  • ARP + ICMP host detection. Distinguishes real devices from nonexistent IP addresses and filters out Wi-Fi ARP-delay noise.
  • Alert engine. Evaluates real-time alert rules, such as latency thresholds, against collected metrics.
  • Threaded collectors. Sends ICMP probes concurrently using a configurable number of worker threads.
  • Custom SQL database (PostgreSQL, SQLite). Persists devices, recorded metrics, alert states, and alert events.
  • Database access from the CLI. Accepts a positional argument for easier access to the database.
  • Diagnostics Manager. Preserves, Collects, and handle application's issues and send them to user to resolve.

Requirements

  • Python 3.12 or later.
  • Elevated network privileges, because ARP and ICMP probing use raw sockets. On Linux, either of the following satisfies this requirement:
    • the cap_net_raw capability granted to the Python interpreter (recommended, see Installation), or
    • root privileges (discouraged for security reasons).

Quick Start

On Linux, the minimal path is:

python3 -m venv --copies venv
source venv/bin/activate
pip install woninet
sudo setcap cap_net_raw=eip venv/bin/python3
woninet --help

For Docker, macOS, Windows, and source installs, see Installation.

Installation

Option 1: Install from PyPI

Create and activate a virtual environment. The --copies flag forces Python to copy the interpreter instead of symlinking it, which is required because the capability is applied directly to the interpreter binary:

python3 -m venv --copies venv
source venv/bin/activate

Install Woninet:

pip install woninet

Grant the required capability to the Python interpreter:

sudo setcap cap_net_raw=eip venv/bin/python3

Run Woninet:

woninet --help

Linux (fallback: system ping)

If you do not grant the capability, Woninet falls back to the system ping command. Create the environment without --copies:

python3 -m venv venv
source venv/bin/activate
pip install woninet
woninet --help

macOS and Windows

pip install woninet
woninet --help

See Platform Notes for privilege considerations on these systems.

Option 2: Docker (Linux only)

Clone the repository and run:

chmod +x build_docker.sh
sudo ./build_docker.sh

The script runs docker compose up -d --build and prints the device's private IP address to standard output so you can open the web interface in a browser.

To open Woninet manually, type device's private IP address with the default 8080 port in the browser.

Option 3: Install from source

  1. Clone the repository:

    git clone https://github.com/woninet/woninet
    cd woninet
    
  2. Create and activate a virtual environment outside the project directory to avoid Multiple top-level packages discovered in a flat-layout errors.

    Linux

    python3 -m venv --copies ../venv
    source ../venv/bin/activate
    

    Windows (PowerShell):

    py -m venv ..\venv
    ..\venv\Scripts\Activate.ps1
    
  3. Install Woninet locally:

    pip3 install .
    
  4. Grant raw-socket access and run.

    Linux: grant the capability to the virtual environment's interpreter, then run Woninet:

    sudo setcap cap_net_raw=eip ../venv/bin/python3
    woninet --version
    

    Running with sudo instead is possible but discouraged for security reasons:

    sudo ../venv/bin/python3 -m woninet
    

    macOS and Windows: run woninet --version after installation.

Configuration

Alert rules and monitoring settings are defined in a JSON file. Rename config.example.json to config.json; Woninet loads it at startup.

When installing from PyPI, config.example.json is not included, so Woninet creates a config.json file with default values.

To use a different configuration file, pass its path with the --config CLI flag.

Example

{
    "monitoring": {
        "arp_noise_limit": 300.0,
        "max_workers": 4
    },
    "database": {
        "type": "sqlite",
        "path": "woninet.db"
    },
    "target_ip_list": [
        "192.168.1.1", "192.168.1.10", "192.168.1.20-30"
    ],
    "alert_rules": [
        {
            "metric": "latency",
            "threshold": 100,
            "consecutive_checks": 3
        },
        {
            "metric": "packet_loss",
            "threshold": 0.0,
            "consecutive_checks": 1
        },
        {
            "metric": "jitter",
            "threshold": 40.0,
            "consecutive_checks": 3
        }
    ]
}

Settings reference

Monitoring

Key Description
arp_noise_limit Latency threshold in milliseconds used to filter ARP resolution noise. Set to 0 to disable filtering. Helps eliminate Wi-Fi latency spikes.
max_workers Maximum number of worker threads used to send ICMP pings. Higher values may increase system load and latency.

Database

Key Description
database.type The database backend: sqlite or postgresql.
database.path The database location. For sqlite, this is the path to the database file. For postgresql, this is a connection URL (see below).

For PostgreSQL, set type to postgresql and provide the connection URL as path:

"database": {
    "type": "postgresql",
    "path": "postgresql+psycopg://user:password@localhost:5432/woninet_db"
}

The URL format is postgresql+psycopg://<username>:<password>@<host>:<port>/<database>. If the password contains special characters (such as @, : or /), percent-encode them.

Note: For the PostgreSQL database, it's recommended to provide the path through .env

A connection URL contains credentials, so storing it in config.json is discouraged. Instead, define the WONINET_DATABASE_URL variable in a .env file. When set, it overrides database.path in config.json:

WONINET_DATABASE_URL=postgresql+psycopg://user:password@localhost:5432/woninet

In this case, config.json only needs the backend type:

"database": {
    "type": "postgresql"
}

The precedence order is:

  1. WONINET_DATABASE_URL (.env file)
  2. database.path in config.json

The .env file is optional. SQLite users can set path directly in config.json.

The .env should be kept in the project's root directory.

Target IP list

Key Description
target_ip_list A single address, a list of addresses, or a range (for example 192.168.1.1-100) to scan. An empty list indicates that no scan cycle will run. Monitoring is currently limited to a /24 subnet (see Known Issues).

Alert rules

Key Description
metric The metric to evaluate: latency, packet_loss, or jitter.
threshold The value that triggers the alert.
consecutive_checks Number of consecutive evaluations required before the alert state changes. Higher values reduce false positives.

Units and ranges

  • Latency: thresholds are evaluated in milliseconds.
  • Jitter: thresholds are evaluated in milliseconds.
  • Packet loss: values are percentages in the range 0.0 to 100.0. A value of 100.0 indicates 100% packet loss, and a threshold of 0.0 triggers on any packet loss.

Usage

See the usage guide for common ways to run Woninet and how to resolve common issues.

Platform Notes

Platform Probing method Privileges
Linux icmplib (recommended) or system ping (fallback) cap_net_raw on the interpreter, or root
macOS Untested Untested
Windows Untested Untested

Woninet has been developed and tested on Linux. macOS and Windows have not been tested, so installation and behavior on those platforms are not guaranteed. Feedback and bug reports from users on these systems are welcome.

Docker deployment is available on Linux only.

Testing

Install the optional test dependencies:

pip install -e ".[test]"

Then run:

pytest

The test suite currently focuses on API behavior and core logic and uses pytest for automated verification.

Known Issues

  • Monitoring is currently limited to a single /24 subnet.

Documentation

For questions or clarification, see the documentation.

Contributing

Thank you for considering a contribution to Woninet. To help maintain code quality, stability, and a predictable release process, please review the Contributing Guide before submitting changes.

License

This project is licensed under the terms of the MIT license.

Metadata

Release files for woninet 2.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for woninet 2.3.0
File Size Uploaded Provenance Actions
woninet-2.3.0.tar.gz 71.8 kB Without provenance Details for woninet-2.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for woninet 2.3.0
File Interpreter ABI Platform Actions
woninet-2.3.0-py3-none-any.whl Python 3 none any Details for woninet-2.3.0-py3-none-any.whl

Total release size: 163.2 kB

Release files / woninet-2.3.0.tar.gz

Download URL woninet-2.3.0.tar.gz
Size 71.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d306ac33c5d931c0a0cc3afd7cb12930748066c0bb03589ed0ec6960a029cb50
BLAKE2b-256 checksum
How to use checksums
559259db98ffe55eb404ba8f90c57d563ccc65f31d76733e7f9aa9195b722340
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / woninet-2.3.0-py3-none-any.whl

Download URL woninet-2.3.0-py3-none-any.whl
Size 91.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1816bbaeedccc5b9b1dc4fbf922955ecb241bdb3ffcfeef2e10ce634c65a40a2
BLAKE2b-256 checksum
How to use checksums
e37d6b27138e8cc2192ad1c7a5f644d45f0dc139fd5df2d4c6547007ab3d4122
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for woninet 2.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page