Internet connection
A comprehensive Grafana dashboard for monitoring internet connection quality, speed, and reliability using Prometheus exporters (Speedtest and Blackbox).
Internet Connection Monitoring Dashboard
A comprehensive Grafana dashboard for monitoring internet connection quality, speed, and reliability using Prometheus exporters (Speedtest and Blackbox).
📋 Overview
This dashboard provides real-time and historical monitoring of your internet connection performance. Track download/upload speeds, latency, jitter, and website availability with detailed HTTP request analysis.
✨ Features
🚀 Speed Monitoring
- Download Speed: Real-time bandwidth monitoring (bits per second)
- Upload Speed: Upload bandwidth tracking with gauge visualization
- Speed History: Time-series graph comparing download and upload speeds
📊 Latency & Quality Metrics
- Ping Latency: Monitor response times to test servers
- Jitter: Network stability measurement (latency variation)
- Historical Trends: Track latency patterns over time
🌐 Website Availability
- Uptime Timeline: Visual state timeline showing website availability
- HTTP Request Duration: Total request time analysis
- Detailed Phase Breakdown:
- DNS Resolution time
- TCP Connection time
- TLS Handshake duration
- Server Processing time
- Data Transfer time
📈 Visualization Types
- Gauge meters for instant readings
- Time series graphs for trend analysis
- State timeline for uptime tracking
- Phase-specific request duration charts
🖼️ Dashboard Panels
📦 Requirements
Prerequisites
- Grafana: Version 12.0 or higher
- Prometheus: As data source
- Speedtest Exporter: For bandwidth and latency metrics
- Recommended: speedtest-exporter
- Blackbox Exporter: For website monitoring and HTTP probes
Required Panels/Plugins
- Gauge panel
- Time series panel
- State timeline panel
🚀 Installation
Method 1: Import via Grafana UI
- Log in to your Grafana instance
- Navigate to Dashboards → New → Import
- Paste the dashboard JSON or upload the JSON file
- Select your Prometheus data source
- Click Import
Method 2: Import via Dashboard ID
(If published to Grafana.com)
- Navigate to Dashboards → New → Import
- Enter the dashboard ID:
XXXXX - Click Load
- Select your Prometheus data source
- Click Import
⚙️ Configuration
Speedtest Exporter Setup
Install and configure the speedtest exporter:
# Using Docker
docker run -d \
--name speedtest-exporter \
-p 9798:9798 \
miguelndecarvalho/speedtest-exporterOr using docker-compose:
version: '3'
services:
speedtest-exporter:
image: miguelndecarvalho/speedtest-exporter
container_name: speedtest-exporter
ports:
- "9798:9798"
restart: unless-stoppedBlackbox Exporter Setup
Configure Blackbox exporter for HTTP probes:
# blackbox.yml
modules:
http_2xx:
prober: http
timeout: 5s
http:
valid_http_versions: ["HTTP/1.1", "HTTP/2.0"]
valid_status_codes: []
method: GET
preferred_ip_protocol: "ip4"# Using Docker
docker run -d \
--name blackbox-exporter \
-p 9115:9115 \
-v /path/to/blackbox.yml:/config/blackbox.yml \
prom/blackbox-exporter:latest \
--config.file=/config/blackbox.ymlPrometheus Configuration
Add both exporters as scrape targets in your prometheus.yml:
scrape_configs:
# Speedtest metrics
- job_name: 'speedtest'
metrics_path: /metrics
scrape_interval: 30m # Avoid excessive bandwidth usage
scrape_timeout: 90s # Speedtests can take time
static_configs:
- targets: ['localhost:9798']
# Blackbox exporter for website monitoring
- job_name: 'blackbox'
metrics_path: /probe
params:
module: [http_2xx]
static_configs:
- targets:
- https://www.google.com
- https://www.cloudflare.com
- https://www.github.com
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: localhost:9115 # Blackbox exporter address
# Blackbox exporter metrics
- job_name: 'blackbox-exporter'
static_configs:
- targets: ['localhost:9115']Important Configuration Notes
Speedtest Scrape Interval:
- Recommended: 30 minutes to 1 hour
- Avoid frequent scraping to prevent excessive bandwidth usage
- Adjust
scrape_timeoutto allow tests to complete (typically 60-90s)
Blackbox Targets:
- Add the websites you want to monitor in the
targetslist - Each target will appear in the Uptime panel
📊 Metrics Reference
Speedtest Metrics
Blackbox Metrics
🎨 Customization
Adjusting Speed Thresholds
Modify the gauge thresholds based on your internet plan:
- Edit the Download or Upload panel
- Go to Field → Thresholds
- Adjust values:
- Green: 0 (default)
- Blue: Your expected speed (e.g., 100 Mbps = 100000000 bps)
Adding Custom Websites to Monitor
- Edit your Prometheus configuration
- Add targets to the
blackboxjob - Reload Prometheus configuration
- The Uptime panel will automatically show new targets
Modifying Speedtest Frequency
Balance between monitoring detail and bandwidth usage:
# Conservative (recommended)
scrape_interval: 1h
scrape_timeout: 90s
# Moderate
scrape_interval: 30m
scrape_timeout: 90s
# Frequent (use with caution)
scrape_interval: 15m
scrape_timeout: 90s🔧 Troubleshooting
No Speedtest Data
Verify the exporter is running:
curl http://localhost:9798/metricsCheck if Prometheus is scraping:
- Go to Prometheus UI → Status → Targets
- Verify
speedtesttarget is UP
Check scrape timeout:
- Speedtests can take 60-90 seconds
- Ensure
scrape_timeoutis sufficient
No Website Uptime Data
Verify Blackbox exporter is running:
curl 'http://localhost:9115/probe?target=google.com&module=http_2xx'Check Prometheus configuration:
- Verify
relabel_configsare correct - Ensure targets are properly formatted
- Verify
Test individual probes:
curl 'http://localhost:9115/probe?target=https://www.google.com&module=http_2xx'
High Jitter Values
High jitter indicates network instability:
- Normal: < 10ms
- Acceptable: 10-30ms
- Poor: > 30ms
If consistently high:
- Check for network congestion
- Verify QoS settings on router
- Contact ISP if persistent
Slow HTTP Request Phases
Identify bottlenecks:
- High Resolve time: DNS issues
- High Connect time: Network/routing problems
- High TLS time: SSL/Certificate negotiation
- High Processing time: Server-side delays
- High Transfer time: Bandwidth limitations
📈 Best Practices
Monitoring Strategy
- Baseline Establishment: Run for 1-2 weeks to establish normal patterns
- Alert Thresholds: Set based on your baseline ±20%
- Retention: Keep at least 30 days of data for trend analysis
Performance Optimization
- Use appropriate scrape intervals
- Limit number of monitored websites (5-10 recommended)
- Consider using recording rules for complex queries
Alerting Recommendations
Create alerts for:
- Download speed < 80% of expected
- Upload speed < 80% of expected
- Ping latency > 100ms
- Website down for > 5 minutes
- Jitter > 30ms consistently
📝 Example Use Cases
Home Network Monitoring
- Track ISP performance vs. advertised speeds
- Identify peak congestion times
- Verify speed consistency throughout the day
Business Connectivity
- Monitor critical website availability
- Track SLA compliance
- Identify network degradation patterns
ISP Accountability
- Document speed issues for ISP support tickets
- Compare different time periods
- Verify service improvements after ISP intervention
🤝 Contributing
Contributions are welcome! Suggestions for improvements:
- Fork the repository
- Create your feature branch
- Commit your changes
- Open a pull request
📝 Changelog
Version 1.0.0 (2024)
- Initial release
- Speedtest integration (download, upload, ping, jitter)
- Blackbox integration (uptime, HTTP phases)
- Gauge and time series visualizations
- State timeline for uptime tracking
📄 License
This dashboard is released under the MIT License.
🔗 Links
Exporters
Documentation
Community
💬 Support
For issues or questions:
- Open an issue on GitHub
- Check the exporter documentation
- Visit the Grafana community forums
🙏 Acknowledgments
- Thanks to the Speedtest exporter maintainers
- Prometheus and Blackbox Exporter teams
- The Grafana community for visualization best practices
⚠️ Important Notes
Bandwidth Considerations
Running speedtests consumes bandwidth:
- Typical test: 100-500 MB
- Hourly tests: ~12 GB/day
- 30-minute tests: ~24 GB/day
Recommendation: Use 30-60 minute intervals to balance monitoring vs. bandwidth usage.
ISP Data Caps
If you have a data cap, monitor your speedtest frequency:
- Calculate daily usage:
tests_per_day × 0.5 GB - Adjust scrape interval accordingly
- Consider reducing frequency during high-usage periods
Monitor your internet connection effectively! 🌐📊⚡
Data source config
Collector config:
Upload an updated version of an exported dashboard.json file from Grafana
| Revision | Description | Created | |
|---|---|---|---|
| Download |
