Skip to content
rumkitPublic

About

Self-hosted reachability monitor: ICMP/SSH/HTTPS probes, Telegram/email alerts, single static binary

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

pingwin: versatile pinging solution

pingwin

A small, self-hosted reachability monitor for a handful of servers.

  • Checks each target with ICMP ping and optional SSH and HTTPS probes.
  • Records why a probe failed (timeout, refused, reset during the TLS handshake, ...), which helps tell "the server is down" apart from "the server is unreachable from the monitor's vantage point".
  • Tracks ping, SSH and HTTPS of each target as Online, Degraded or Offline, and re-checks a failure before raising an alarm.
  • Sends alerts over Telegram, with email as a backup when Telegram is unreachable.
  • Comes with a password-protected web dashboard: status overview, history and charts, events, target and notification setup.
  • Ships as a single static Rust binary in a tiny FROM scratch container (about 8 MB).

The dashboard overview: one card per target with the state of ping, SSH and HTTPS A target page: status timeline for ping, SSH and HTTPS, and a chart of ping round-trip times with an outage

Quick start

All you need is Docker. Run the published image with your own password:

docker run -d --name pingwin --restart unless-stopped \
  -p 8080:8080 \
  -v pingwin-data:/data \
  -e PINGWIN_PASSWORD='change-me' \
  -e PINGWIN_ALLOW_HTTP=true \
  --sysctl net.ipv4.ping_group_range="0 2147483647" \
  ghcr.io/rumkit/pingwin:0.1
  • PINGWIN_PASSWORD is the only required setting.
  • PINGWIN_ALLOW_HTTP=true is for plain HTTP and only for testing locally. Drop it if an HTTPS reverse proxy is in front.
  • --sysctl lets ping work without root or extra capabilities (see ICMP permissions).
  • The pingwin-data volume holds the database and the key that encrypts the stored bot token and SMTP password.

To build from source instead, run docker build -t pingwin . in a checkout of this repository and use pingwin as the image name.

Docker Compose

The compose example also drops all capabilities, makes the root filesystem read-only and keeps the encryption key in its own volume. Copy the two sample files:

cp docker-compose.example.yml docker-compose.yml
cp .env.example .env

Then make these edits:

File Edit When
.env Replace change-me in PINGWIN_PASSWORD with your password Always
.env Uncomment PINGWIN_ALLOW_HTTP and set it to true Testing locally. No HTTPS reverse proxy in front
docker-compose.yml Comment out the image: line and uncomment # build: . Building from source
docker-compose.yml Replace the "8080:8080" port mapping with the commented 127.0.0.1 one The reverse proxy runs on the same host

Start it (if you ran the container from above, remove it first with docker rm -f pingwin):

docker compose up -d

Back up the pingwin-keys volume as well as the data: without the key the stored secrets can't be read (see Configuration).

First steps

  1. Open http://localhost:8080 and log in with your password.
  2. Click Add target, enter a name and a host, and tick SSH or HTTPS if you want those checked too. The first check runs within seconds.
  3. Open the Notifications page, enter your Telegram bot token and chat ID (Detect chat ID helps find it), tick Enabled, press Send test and save. Set up the email backup the same way.

Documentation

  • Configuration: environment variables, password, session and encryption keys, reset-secrets
  • ICMP permissions: how ping works without root or NET_RAW
  • Dashboard: login and sessions, pages, CSV export, how checks and re-checks are scheduled
  • Notifications: Telegram and email setup, what is sent, failover, daily heartbeat
  • Data: retention, CSV format, pingwin dump
  • CLI commands: serve, healthcheck, probe, reset-secrets, dump
  • Development: building, testing, acceptance checks, CI, releasing
  • Architecture: how pingwin is built and why

License

MIT

About

Self-hosted reachability monitor: ICMP/SSH/HTTPS probes, Telegram/email alerts, single static binary

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages