feat: add Grafana dashboard example#5
Conversation
Add pre-built Grafana dashboard (examples/grafana-dashboard.json) with: - Overview panels: request rate, error rate, latency, connections, bandwidth, cache hit - Request metrics: rate by zone, response status, HTTP methods, bandwidth, cache status - Latency metrics: average latency, p50/p90/p99 percentiles, per-zone breakdown - Upstream metrics: request rate, response time percentiles, failures, bandwidth - Connection metrics: states, accepted/handled rate - SSL/TLS metrics: protocol distribution, session reuse rate - Rate limiting status visualization - Template variables for job, zone, and upstream filtering Compatible with Grafana 10.0+, uses histogram_quantile() for percentiles.
There was a problem hiding this comment.
Pull request overview
This PR adds a pre-built Grafana dashboard to visualize NGINX metrics collected by lua-resty-ngxstats. The dashboard provides comprehensive monitoring across request metrics, latency, upstream performance, connections, and SSL/TLS with template variables for filtering.
Changes:
- Added Grafana dashboard JSON file with 30+ panels covering all metrics
- Updated README with dashboard import instructions and feature overview
- Updated CHANGELOG documenting the new dashboard feature
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| examples/grafana-dashboard.json | Complete Grafana dashboard configuration with panels for overview, requests, latency, upstream, connections, and SSL/TLS metrics |
| README.md | Added dashboard import section with feature list |
| CHANGELOG.md | Documented new Grafana dashboard feature in Unreleased section |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| ### 4. Import Grafana Dashboard | ||
|
|
||
| Import the pre-built dashboard from `examples/grafana-dashboard.json` or use dashboard ID from Grafana.com (if published). |
There was a problem hiding this comment.
The mention of a dashboard ID from Grafana.com creates ambiguity since no ID is provided and it's conditional on 'if published'. Either provide the specific dashboard ID or remove this reference to avoid confusion.
| Import the pre-built dashboard from `examples/grafana-dashboard.json` or use dashboard ID from Grafana.com (if published). | |
| Import the pre-built dashboard from `examples/grafana-dashboard.json`. |
Summary
examples/grafana-dashboard.json) for visualizing NGINX metricsDashboard Panels
Overview Row (6 stat panels)
Request Metrics
Latency Metrics
Upstream Metrics
Connections
SSL/TLS & Rate Limiting
Template Variables
job- Filter by Prometheus jobzone- Filter by server zone (multi-select)upstream- Filter by upstream (multi-select)Test plan
🤖 Generated with Claude Code