feat: add Prometheus alerting rules example#6
Merged
Conversation
Add pre-built alerting rules (examples/prometheus-alerts.yml) with: - Availability: NGINX down, no requests received - Errors: High 5xx/4xx error rates with warning/critical thresholds - Latency: High p99 latency, elevated average latency - Upstream: Failures, high error rate, high latency, no requests - Connections: High active connections, unhandled connections - Cache: Low hit rate, high bypass rate - Rate limiting: High rejection rate, active rate limiting - SSL/TLS: Low session reuse, deprecated protocol usage - Traffic: Spikes, drops, high bandwidth Update prometheus.yml to include rule_files configuration.
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive Prometheus alerting rules for NGINX monitoring with production-ready thresholds. The changes enable operators to receive notifications for critical issues like service downtime, error spikes, latency problems, and upstream failures.
Changes:
- Adds
examples/prometheus-alerts.ymlwith 26 alerting rules organized into 9 groups covering availability, errors, latency, upstream health, connections, caching, rate limiting, SSL/TLS, and traffic anomalies - Updates
examples/prometheus.ymlto reference the new alert rules file and includes commented alertmanager configuration - Documents the alerting configuration in README with a summary of alert groups
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| examples/prometheus.yml | Adds rule_files configuration pointing to prometheus-alerts.yml and commented alertmanager setup |
| examples/prometheus-alerts.yml | New file containing 26 alerting rules across 9 groups with critical, warning, and info severity levels |
| README.md | Adds "Configure Alerting" section documenting the alert groups |
| CHANGELOG.md | Documents the new alerting rules feature in the Unreleased section |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
examples/prometheus-alerts.yml)examples/prometheus.ymlto include rule_files configurationAlert Groups
nginx_availabilitynginx_errorsnginx_latencynginx_upstreamnginx_connectionsnginx_cachenginx_rate_limitingnginx_sslnginx_trafficSeverity Levels
Test plan
promtool check rules prometheus-alerts.yml🤖 Generated with Claude Code