{"id":49543129,"url":"https://github.com/vdw/pingraph","last_synced_at":"2026-05-02T16:30:28.081Z","repository":{"id":343782480,"uuid":"1170633818","full_name":"vdw/pingraph","owner":"vdw","description":"A modern, self-hosted network latency monitor for homelabs.","archived":false,"fork":false,"pushed_at":"2026-04-13T15:11:08.000Z","size":365,"stargazers_count":0,"open_issues_count":18,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-19T16:44:33.344Z","etag":null,"topics":["devops","homelab","latency","monitoring","network-monitoring","observability","ping","rails","ruby-on-rails","self-hosted","smokeping"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vdw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-02T10:45:38.000Z","updated_at":"2026-03-15T09:58:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vdw/pingraph","commit_stats":null,"previous_names":["vdw/pingraph"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vdw/pingraph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdw%2Fpingraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdw%2Fpingraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdw%2Fpingraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdw%2Fpingraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vdw","download_url":"https://codeload.github.com/vdw/pingraph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdw%2Fpingraph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32541886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T12:25:33.646Z","status":"ssl_error","status_checked_at":"2026-05-02T12:24:51.733Z","response_time":132,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","homelab","latency","monitoring","network-monitoring","observability","ping","rails","ruby-on-rails","self-hosted","smokeping"],"created_at":"2026-05-02T16:30:27.638Z","updated_at":"2026-05-02T16:30:28.067Z","avatar_url":"https://github.com/vdw.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pingraph\n\n[![CI](https://github.com/vdw/pingraph/actions/workflows/ci.yml/badge.svg)](https://github.com/vdw/pingraph/actions/workflows/ci.yml)\n\nA modern, self-hosted network latency monitor for homelabs. Pingraph is a lightweight alternative to [SmokePing](https://oss.oetiker.ch/smokeping/) with a web-first configuration experience — no flat-file configs, no legacy CGI setup.\n\nOrganize hosts into groups, visualize latency trends with smoke-style charts (min/avg/max RTT over time), and monitor packet loss — all from a clean Tailwind UI.\n\n---\n\n## Stack\n\n| Layer | Technology |\n|---|---|\n| Framework | Ruby on Rails 8.1 |\n| Database | SQLite 3 (WAL mode) |\n| Background jobs | Solid Queue (built-in Rails 8 scheduler) |\n| Cache | Solid Cache |\n| Asset pipeline | Propshaft + Importmaps |\n| Frontend | Hotwire (Turbo + Stimulus) + Tailwind CSS v4 |\n| Charts | Chart.js 4 (ESM via esm.sh) |\n| Auth | Rails 8 native authentication |\n| Deployment | Docker + Kamal |\n\n---\n\n## Domain Model\n\n- **Group** — logical container for hosts (e.g. \"Internal Infrastructure\", \"External Services\")\n- **Host** — a monitored target (IP or hostname) with a configurable polling interval (minimum 10 s)\n- **Ping** — a single probe result: `min_latency`, `latency` (avg), `max_latency` (ms), `packet_loss` (%), `recorded_at`\n\n---\n\n## Getting Started\n\n**Requirements:** Ruby 4.x, `iputils-ping` (or equivalent), `iperf3` (for on-demand speed tests), `NET_RAW` capability if running in Docker.\n\n```bash\ngit clone git@github.com:vdw/pingraph.git\ncd pingraph\nbundle install\nbin/rails db:prepare db:seed\nbin/dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) and sign in:\n\n| Field | Value |\n|---|---|\n| Email | `admin@pingraph.local` |\n| Password | `pingraph123` |\n\n\u003e Change these credentials after first login.\n\n`bin/dev` starts three processes via `Procfile.dev`:\n- `web` — Puma (Rails server)\n- `css` — Tailwind CSS watcher\n- `worker` — Solid Queue (runs `HostPollerJob` every minute)\n\n---\n\n## How It Works\n\n`HostPollerJob` runs every minute via Solid Queue's built-in recurring scheduler. It checks each host's last probe time against its configured interval and enqueues a `PingJob` for any host that is due. `PingJob` calls `PingService`, which executes `ping -c 5 -q -W 2 \u003caddress\u003e` and parses the summary output to extract min/avg/max RTT and packet loss percentage.\n\nOn the Speed Tests page, you can run on-demand speed tests for any configured host. `PerformSpeedTestJob` calls `SpeedTestService`, which executes `iperf3 -c \u003caddress\u003e -J -t 5` and stores receiver throughput in Mbps.\n\n---\n\n## Git Hooks\n\nCommits can automatically run the test suite via a repository-managed `pre-commit` hook.\n\nEnable it once per clone:\n\n```bash\ngit config core.hooksPath .githooks\n```\n\nThis is also configured automatically when you run:\n\n```bash\nbin/setup --skip-server\n```\n\nTo bypass the hook for an exceptional commit:\n\n```bash\nSKIP_TESTS=1 git commit -m \"...\"\n```\n\n---\n\n## Docker\n\nThe included `Dockerfile` builds a production image.\n\nPrebuilt images are also published by GitHub Actions on every push to `main`:\n\n```bash\ndocker pull ghcr.io/vdw/pingraph:latest\ndocker run -d \\\n  --name pingraph \\\n  -p 3000:80 \\\n  --cap-add=NET_RAW \\\n  -e RAILS_MASTER_KEY=\"\u003cyour master key\u003e\" \\\n  -e SOLID_QUEUE_IN_PUMA=true \\\n  -v pingraph_storage:/rails/storage \\\n  ghcr.io/vdw/pingraph:latest\n```\n\nBuild and run locally:\n\n```bash\ndocker build -t pingraph .\ndocker run -d \\\n  --name pingraph \\\n  -p 3000:80 \\\n  --cap-add=NET_RAW \\\n  -e RAILS_MASTER_KEY=\"$(cat config/master.key)\" \\\n  -e SOLID_QUEUE_IN_PUMA=true \\\n  -v pingraph_storage:/rails/storage \\\n  pingraph\n```\n\nIf you are running throughput tests against nearby hosts and want to avoid Docker bridge/NAT overhead, you can run with host networking (Linux only):\n\n```bash\ndocker run -d \\\n  --name pingraph \\\n  --network host \\\n  --cap-add=NET_RAW \\\n  -e RAILS_MASTER_KEY=\"$(cat config/master.key)\" \\\n  -e SOLID_QUEUE_IN_PUMA=true \\\n  -v pingraph_storage:/rails/storage \\\n  pingraph\n```\n\nNotes for host networking:\n- `-p` port mapping is not used with `--network host`.\n- Access the app directly on the container's bound port (default Rails/Thruster HTTP port).\n- Host networking is supported on Linux; Docker Desktop (macOS/Windows) does not provide equivalent behavior.\n\nContainer requirements:\n\n- `RAILS_MASTER_KEY` (production credentials)\n- `SOLID_QUEUE_IN_PUMA=true` (runs recurring scheduler + queue worker in single-container mode)\n- `NET_RAW` capability (required for ICMP ping)\n- `iperf3` binary available in the container (installed by the provided `Dockerfile`)\n- Persistent volume for `/rails/storage` (SQLite + Solid Queue/Cache/Cable databases)\n\nCompose/Kamal capability setting:\n\n```yaml\n# docker-compose or Kamal config\ncap_add:\n  - NET_RAW\n\n# Optional for Linux performance-sensitive iperf3 runs (docker-compose/manual Docker):\n# network_mode: host\n```\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdw%2Fpingraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvdw%2Fpingraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdw%2Fpingraph/lists"}