Skip to main content

PingPoll

A small Flask library and app that pings a list of network devices, resolves their hostnames, and shows live status, latency and uptime on a dashboard — plus a subnet discovery sweep to find live hosts that aren't on your list yet.

Install

pip install -e .

Run

pingpoll --init        # write an example NetFile into the current directory
pingpoll               # serve the dashboard on http://localhost:5001

Or without installing:

pip install -r requirements.txt
python run.py

Use as a library

from pingpoll import serve
serve("NetFile", port=5001)          # blocking dev server
from pingpoll import create_app       # build the Flask app (e.g. for gunicorn)
app = create_app("NetFile")
from pingpoll import Monitor, Scanner # the pieces on their own

How it works

  • NetFile — your device list. One entry per line: <ip_or_host> [optional friendly name]. Lines starting with # are ignored. The path defaults to $PINGPOLL_NETFILE, else ./NetFile.
  • pingpoll.monitor — a background thread pings every device on an interval (default 10s), keeps rolling history, and computes uptime %, average latency, and up/down transitions. Hostnames are reverse-resolved.
  • pingpoll.app — the Flask app factory serving the dashboard and JSON API.
  • templates/ + static/ — the dashboard (auto-refreshes every 5s).

Network discovery

PingPoll can sweep your local subnet to find live hosts that aren't in the NetFile. It auto-detects the local /24 (and any private /24s implied by addresses already in the NetFile), pings every host, resolves hostnames, and flags each as In NetFile (defined) or Undefined.

  • In the dashboard: click Scan network. Undefined hosts get a checkbox; select the ones you want and click Add selected to NetFile to append them (with their resolved hostname) and start monitoring immediately.

  • From the terminal:

    pingpoll --scan
    

    prints a table of every live host and whether it's defined.

CLI

pingpoll [--netfile PATH] [--port 5001] [--host 0.0.0.0] [--open] [--debug]
pingpoll --init     # write an example NetFile and exit
pingpoll --scan     # one-off terminal subnet scan and exit

API

Endpoint Method Purpose
/ GET Dashboard
/api/status GET Full status snapshot (JSON)
/api/reload POST Re-read the NetFile without restarting
/api/scan POST Start a subnet discovery sweep
/api/discovery GET Discovery results + progress (JSON)
/api/adopt POST Append discovered hosts to the NetFile

Configuration

Tunables live at the top of pingpoll/monitor.py: PING_INTERVAL, PING_TIMEOUT, HISTORY_LEN, WORKERS. Ping flags auto-adjust for macOS / Linux / Windows.

Download files

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

Source Distribution

pingpoll-0.1.0.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

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

pingpoll-0.1.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file pingpoll-0.1.0.tar.gz.

File metadata

  • Download URL: pingpoll-0.1.0.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pingpoll-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9597bb8f2a03e4eaeb06ec5fe51e8b82c9f796b45a6e4fccb28e6d6255c63c0a
MD5 79b880441e1847d623f68ac889ba2e87
BLAKE2b-256 11f924ce489260346b60f98cbdbb167d31b18d446e803a9eef632e1f4d471e3c

See more details on using hashes here.

File details

Details for the file pingpoll-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pingpoll-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pingpoll-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3141f714aee9dc27ce6753b6a0365a7975a860e2e725e30e8be555fd5b6a30ce
MD5 c90c48cbd0b45c3eba66d544b558a153
BLAKE2b-256 781c9ed1ccc6994a146dbf53ef3e45765747047f0d404fb1ac9abc14e58c462f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

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