A premium analytics dashboard plugin for LibreSpeed. Replaces the basic stats.php with a full-featured, interactive reporting interface.
Summary cards with sparklines, speed over time, latency tracking, and speed distribution.
Top ISPs, tests by town/state, browser/OS distribution, and peak hours heatmap.
Sortable, searchable, paginated table with CSV and JSON export.
Summary Dashboard
- Total tests, unique IPs, unique ISPs, average download/upload/ping
- Sparkline trends in each stat card (last 30 days)
- Time period selector: 24h, 7d, 30d, 90d, All Time, Custom date range
Charts
- Speed Over Time — download and upload line chart with gradient fills
- Latency Over Time — ping and jitter tracking
- Speed Distribution — histogram buckets (0-25, 25-50, 50-100, 100-200, 200-500, 500+ Mbps)
- Top ISPs — horizontal bar chart with average speeds per ISP
- Geographic breakdown — tests by town and state with cached GeoIP enrichment
- Browser and OS distribution — parsed from user agent strings
- Peak Hours heatmap — day of week vs. hour of day
Data Table
- Full sortable, searchable, paginated results table
- Columns: ID, date, IP, ISP, town, state, country, download, upload, ping, jitter, browser
- Per-page selector (25/50/100)
Export
- CSV export
- JSON export
- PHP 7.4+
- SQLite3 PHP extension
- LibreSpeed with telemetry enabled
- Chart.js (loaded from CDN, no local install needed)
-
Copy
analytics.phpto your LibreSpeedresults/directory:cp analytics.php /path/to/librespeed/results/analytics.php -
Make sure
telemetry_settings.phpexists in the same directory with your$stats_passwordset:<?php $db_type = "sqlite"; $Sqlite_db_file = "/path/to/librespeed/results/telemetry.db"; $stats_password = "your-password-here";
-
Access the dashboard at:
https://your-server/results/analytics.php
- Single PHP file — no build tools, no npm, no composer
- Reads from the existing LibreSpeed telemetry SQLite database
- Creates a local
geoip_cacheSQLite table for cached GeoIP enrichment - All charts rendered client-side with Chart.js
- Data fetched via internal JSON API endpoints (
?api=summary,?api=timeseries, etc.) - Authentication uses the same
$stats_passwordfromtelemetry_settings.php - Current GeoIP enrichment uses cached lookups against
ip-api.com; for fully local production enrichment, GeoLite2 City is a strong next step
All endpoints require authentication and accept period and optional start/end query parameters.
| Endpoint | Description |
|---|---|
?api=summary |
Aggregate stats (counts, averages) |
?api=sparkline |
Daily aggregates for last 30 days |
?api=timeseries |
Raw speed/latency data points over time |
?api=distribution |
Speed distribution buckets |
?api=isp |
Top ISPs by test count with average speeds |
?api=geo |
Tests by town, state, country, and ASN |
?api=devices |
Browser and OS breakdown |
?api=heatmap |
Tests by hour and day of week |
?api=table |
Paginated, sortable, searchable results |
?api=export&format=csv |
CSV download |
?api=export&format=json |
JSON download |
MIT
Dakota Cole