Skip to content

feat: add Grafana dashboard example#5

Merged
abtreece merged 1 commit into
mainfrom
feature/grafana-dashboard
Jan 16, 2026
Merged

feat: add Grafana dashboard example#5
abtreece merged 1 commit into
mainfrom
feature/grafana-dashboard

Conversation

@abtreece

Copy link
Copy Markdown
Owner

Summary

  • Add pre-built Grafana dashboard (examples/grafana-dashboard.json) for visualizing NGINX metrics
  • Update README with dashboard import instructions
  • Update CHANGELOG with new feature

Dashboard Panels

Overview Row (6 stat panels)

  • Request rate, error rate (5xx %), average latency, active connections, bandwidth, cache hit rate

Request Metrics

  • Request rate by zone, response status classes (2xx/3xx/4xx/5xx), HTTP methods distribution, bandwidth by zone, cache status distribution

Latency Metrics

  • Average request latency by zone, latency percentiles (p50/p90/p99), per-zone percentile bar gauges with thresholds

Upstream Metrics

  • Request rate, average response time, response time percentiles, response status, failures, bandwidth

Connections

  • Connection states (active/reading/writing/idle), accepted/handled rate

SSL/TLS & Rate Limiting

  • Protocol distribution, session reuse rate, rate limiting status

Template Variables

  • job - Filter by Prometheus job
  • zone - Filter by server zone (multi-select)
  • upstream - Filter by upstream (multi-select)

Test plan

  • Import dashboard into Grafana 10.0+
  • Verify panels load with Prometheus data source
  • Confirm template variables populate correctly
  • Check percentile calculations work with histogram data

🤖 Generated with Claude Code

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.
Copilot AI review requested due to automatic review settings January 16, 2026 01:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread README.md

### 4. Import Grafana Dashboard

Import the pre-built dashboard from `examples/grafana-dashboard.json` or use dashboard ID from Grafana.com (if published).

Copilot AI Jan 16, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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`.

Copilot uses AI. Check for mistakes.
@abtreece abtreece merged commit 9a9837e into main Jan 16, 2026
8 checks passed
@abtreece abtreece deleted the feature/grafana-dashboard branch January 16, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants