Skip to main content

A Python app that continuously polls your home WiFi and network uptime, logs any downtime, and serves a live status dashboard in your browser. The dashboard can be accessed by any device on the same network.

Project description

Heimdall logo

Heimdall Network Watcher

A Python app that continuously polls your home WiFi and network uptime, logs any downtime, and serves a live status dashboard in your browser. The dashboard can be accessed by any device on the same network.

Alt text

Features

  • Continuous monitoring - Pings a configurable target (default: 8.8.8.8) at a set interval
  • Downtime logging - Records each outage with start and end time in SQLite
  • Live dashboard - Web UI showing current status, 24h uptime %, and recent downtime events
  • Cross-platform - Uses the system ping command (Windows and Unix)

Quick start

  1. Create a virtual environment and install dependencies

    python -m venv .venv
    .venv\Scripts\activate   # Windows
    # source .venv/bin/activate   # macOS/Linux
    pip install -r requirements.txt
    
  2. Run the app

    python app.py
    
  3. Open the dashboard

    In your browser go to: http://localhost:9000 On the same WiFi, other devices can use http://:9000 (for example, http://192.168.1.42:9000).

The monitor runs in the background and the dashboard auto-refreshes every few seconds.

Configuration

Environment variables (optional):

Variable Description Default
HEIMDALL_PING_TARGET Host to ping (IP or hostname) 8.8.8.8
HEIMDALL_POLL_INTERVAL Seconds between checks 10
HEIMDALL_PING_TIMEOUT Ping timeout in seconds 5
HEIMDALL_DB SQLite database path heimdall.db
HEIMDALL_HOST Flask bind address 0.0.0.0
HEIMDALL_PORT Flask port 9000

Example: Monitor your router and check every 5 seconds:

set HEIMDALL_PING_TARGET=8.8.8.8
set HEIMDALL_POLL_INTERVAL=5
python app.py

On Linux/macOS use export HEIMDALL_PING_TARGET=192.168.1.1 etc.

API

  • GET / - Dashboard (HTML)
  • GET /api/status - Current status (up/down, last check, current downtime)
  • GET /api/stats - 24h uptime % and sample count
  • GET /api/downtimes - Recent downtime intervals

Requirements

  • Python 3.8+
  • Flask (see requirements.txt)

No special permissions needed; uses standard ping and a local SQLite file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

heimdall_network_monitor-0.2.0.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

heimdall_network_monitor-0.2.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file heimdall_network_monitor-0.2.0.tar.gz.

File metadata

  • Download URL: heimdall_network_monitor-0.2.0.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for heimdall_network_monitor-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a7a238bb46660d32de769a3c7d2ce22165cf18176aaedb6b6eb41165a8f7c515
MD5 2da806d0a5666032538b8dab13f7d431
BLAKE2b-256 be1298551d630f5784c86d7039b5aa3ae31c0da02e4d534fc4062639ddc8e0de

See more details on using hashes here.

File details

Details for the file heimdall_network_monitor-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: heimdall_network_monitor-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for heimdall_network_monitor-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 41fe29aa379ddf5d17a8625fefbdb80ecc9a71ddd21473e928a7870675084c63
MD5 c248a4575f7c1f12f190e179cd9c5224
BLAKE2b-256 4b3859faf0dee6a517098f9027c86a618fc10a66cd389e86d8f8a087cc5d5ed6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page