mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-21 08:57:19 +08:00
Merge branch 'master' into master
This commit is contained in:
commit
89252f999f
11 changed files with 1845 additions and 838 deletions
|
|
@ -3,20 +3,37 @@
|
|||
|
||||
## Adding alerting rule
|
||||
|
||||
If you don't have time to write a PR, just copy and paste some alerts into an issue. We will format it accordingly.
|
||||
|
||||
Rules are here: `_data/rules.yml`.
|
||||
|
||||
## Run localy
|
||||
|
||||
```
|
||||
gem install bundler
|
||||
bundle install
|
||||
bundle exec jekyll serve
|
||||
```
|
||||
|
||||
## Guidelines
|
||||
### Guidelines
|
||||
|
||||
Please ensure your pull request adheres to the following guidelines:
|
||||
|
||||
- Search previous suggestions before making a new one, as yours may be a duplicate.
|
||||
- Keep descriptions short and simple, but descriptive.
|
||||
- Description must be factual (the "what?") and should provide root cause suggestions (the "why?"), for faster resolution.
|
||||
- Queries must be tested on latest exporter version.
|
||||
|
||||
## Improving Github page
|
||||
|
||||
### Run localy
|
||||
|
||||
```
|
||||
gem install bundler
|
||||
bundle install
|
||||
jekyll serve
|
||||
```
|
||||
|
||||
Or with Docker:
|
||||
|
||||
```
|
||||
docker run --rm -it -p 4000:4000 -v $(pwd):/srv/jekyll jekyll/jekyll jekyll serve
|
||||
```
|
||||
|
||||
Or with Docker-Compose:
|
||||
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
|
|
|||
210
Gemfile.lock
210
Gemfile.lock
|
|
@ -1,13 +1,14 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
activesupport (4.2.10)
|
||||
i18n (~> 0.7)
|
||||
activesupport (6.0.3.1)
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
i18n (>= 0.7, < 2)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
addressable (2.5.2)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
zeitwerk (~> 2.2, >= 2.2.2)
|
||||
addressable (2.7.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
coffee-script (2.4.1)
|
||||
coffee-script-source
|
||||
execjs
|
||||
|
|
@ -15,43 +16,42 @@ GEM
|
|||
colorator (1.1.0)
|
||||
commonmarker (0.17.13)
|
||||
ruby-enum (~> 0.5)
|
||||
concurrent-ruby (1.0.5)
|
||||
dnsruby (1.61.2)
|
||||
concurrent-ruby (1.1.6)
|
||||
dnsruby (1.61.3)
|
||||
addressable (~> 2.5)
|
||||
em-websocket (0.5.1)
|
||||
eventmachine (>= 0.12.9)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
ethon (0.11.0)
|
||||
ethon (0.12.0)
|
||||
ffi (>= 1.3.0)
|
||||
eventmachine (1.2.7)
|
||||
execjs (2.7.0)
|
||||
faraday (0.15.3)
|
||||
faraday (1.0.0)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
ffi (1.9.25)
|
||||
ffi (1.12.2)
|
||||
forwardable-extended (2.6.0)
|
||||
gemoji (3.0.0)
|
||||
github-pages (192)
|
||||
activesupport (= 4.2.10)
|
||||
github-pages-health-check (= 1.8.1)
|
||||
jekyll (= 3.7.4)
|
||||
jekyll-avatar (= 0.6.0)
|
||||
gemoji (3.0.1)
|
||||
github-pages (204)
|
||||
github-pages-health-check (= 1.16.1)
|
||||
jekyll (= 3.8.5)
|
||||
jekyll-avatar (= 0.7.0)
|
||||
jekyll-coffeescript (= 1.1.1)
|
||||
jekyll-commonmark-ghpages (= 0.1.5)
|
||||
jekyll-commonmark-ghpages (= 0.1.6)
|
||||
jekyll-default-layout (= 0.1.4)
|
||||
jekyll-feed (= 0.10.0)
|
||||
jekyll-feed (= 0.13.0)
|
||||
jekyll-gist (= 1.5.0)
|
||||
jekyll-github-metadata (= 2.9.4)
|
||||
jekyll-mentions (= 1.4.1)
|
||||
jekyll-optional-front-matter (= 0.3.0)
|
||||
jekyll-github-metadata (= 2.13.0)
|
||||
jekyll-mentions (= 1.5.1)
|
||||
jekyll-optional-front-matter (= 0.3.2)
|
||||
jekyll-paginate (= 1.1.0)
|
||||
jekyll-readme-index (= 0.2.0)
|
||||
jekyll-redirect-from (= 0.14.0)
|
||||
jekyll-relative-links (= 0.5.3)
|
||||
jekyll-remote-theme (= 0.3.1)
|
||||
jekyll-readme-index (= 0.3.0)
|
||||
jekyll-redirect-from (= 0.15.0)
|
||||
jekyll-relative-links (= 0.6.1)
|
||||
jekyll-remote-theme (= 0.4.1)
|
||||
jekyll-sass-converter (= 1.5.2)
|
||||
jekyll-seo-tag (= 2.5.0)
|
||||
jekyll-sitemap (= 1.2.0)
|
||||
jekyll-swiss (= 0.4.0)
|
||||
jekyll-seo-tag (= 2.6.1)
|
||||
jekyll-sitemap (= 1.4.0)
|
||||
jekyll-swiss (= 1.0.0)
|
||||
jekyll-theme-architect (= 0.1.1)
|
||||
jekyll-theme-cayman (= 0.1.1)
|
||||
jekyll-theme-dinky (= 0.1.1)
|
||||
|
|
@ -61,33 +61,32 @@ GEM
|
|||
jekyll-theme-midnight (= 0.1.1)
|
||||
jekyll-theme-minimal (= 0.1.1)
|
||||
jekyll-theme-modernist (= 0.1.1)
|
||||
jekyll-theme-primer (= 0.5.3)
|
||||
jekyll-theme-primer (= 0.5.4)
|
||||
jekyll-theme-slate (= 0.1.1)
|
||||
jekyll-theme-tactile (= 0.1.1)
|
||||
jekyll-theme-time-machine (= 0.1.1)
|
||||
jekyll-titles-from-headings (= 0.5.1)
|
||||
jemoji (= 0.10.1)
|
||||
jekyll-titles-from-headings (= 0.5.3)
|
||||
jemoji (= 0.11.1)
|
||||
kramdown (= 1.17.0)
|
||||
liquid (= 4.0.0)
|
||||
listen (= 3.1.5)
|
||||
liquid (= 4.0.3)
|
||||
mercenary (~> 0.3)
|
||||
minima (= 2.5.0)
|
||||
nokogiri (>= 1.8.2, < 2.0)
|
||||
rouge (= 2.2.1)
|
||||
minima (= 2.5.1)
|
||||
nokogiri (>= 1.10.4, < 2.0)
|
||||
rouge (= 3.13.0)
|
||||
terminal-table (~> 1.4)
|
||||
github-pages-health-check (1.8.1)
|
||||
github-pages-health-check (1.16.1)
|
||||
addressable (~> 2.3)
|
||||
dnsruby (~> 1.60)
|
||||
octokit (~> 4.0)
|
||||
public_suffix (~> 2.0)
|
||||
public_suffix (~> 3.0)
|
||||
typhoeus (~> 1.3)
|
||||
html-pipeline (2.8.4)
|
||||
html-pipeline (2.12.3)
|
||||
activesupport (>= 2)
|
||||
nokogiri (>= 1.4)
|
||||
http_parser.rb (0.6.0)
|
||||
i18n (0.9.5)
|
||||
concurrent-ruby (~> 1.0)
|
||||
jekyll (3.7.4)
|
||||
jekyll (3.8.5)
|
||||
addressable (~> 2.4)
|
||||
colorator (~> 1.0)
|
||||
em-websocket (~> 0.5)
|
||||
|
|
@ -100,49 +99,50 @@ GEM
|
|||
pathutil (~> 0.9)
|
||||
rouge (>= 1.7, < 4)
|
||||
safe_yaml (~> 1.0)
|
||||
jekyll-avatar (0.6.0)
|
||||
jekyll (~> 3.0)
|
||||
jekyll-avatar (0.7.0)
|
||||
jekyll (>= 3.0, < 5.0)
|
||||
jekyll-coffeescript (1.1.1)
|
||||
coffee-script (~> 2.2)
|
||||
coffee-script-source (~> 1.11.1)
|
||||
jekyll-commonmark (1.2.0)
|
||||
jekyll-commonmark (1.3.1)
|
||||
commonmarker (~> 0.14)
|
||||
jekyll (>= 3.0, < 4.0)
|
||||
jekyll-commonmark-ghpages (0.1.5)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-commonmark-ghpages (0.1.6)
|
||||
commonmarker (~> 0.17.6)
|
||||
jekyll-commonmark (~> 1)
|
||||
rouge (~> 2)
|
||||
jekyll-commonmark (~> 1.2)
|
||||
rouge (>= 2.0, < 4.0)
|
||||
jekyll-default-layout (0.1.4)
|
||||
jekyll (~> 3.0)
|
||||
jekyll-feed (0.10.0)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-feed (0.13.0)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-gist (1.5.0)
|
||||
octokit (~> 4.2)
|
||||
jekyll-github-metadata (2.9.4)
|
||||
jekyll (~> 3.1)
|
||||
jekyll-github-metadata (2.13.0)
|
||||
jekyll (>= 3.4, < 5.0)
|
||||
octokit (~> 4.0, != 4.4.0)
|
||||
jekyll-mentions (1.4.1)
|
||||
jekyll-mentions (1.5.1)
|
||||
html-pipeline (~> 2.3)
|
||||
jekyll (~> 3.0)
|
||||
jekyll-optional-front-matter (0.3.0)
|
||||
jekyll (~> 3.0)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-optional-front-matter (0.3.2)
|
||||
jekyll (>= 3.0, < 5.0)
|
||||
jekyll-paginate (1.1.0)
|
||||
jekyll-readme-index (0.2.0)
|
||||
jekyll (~> 3.0)
|
||||
jekyll-redirect-from (0.14.0)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-relative-links (0.5.3)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-remote-theme (0.3.1)
|
||||
jekyll (~> 3.5)
|
||||
rubyzip (>= 1.2.1, < 3.0)
|
||||
jekyll-readme-index (0.3.0)
|
||||
jekyll (>= 3.0, < 5.0)
|
||||
jekyll-redirect-from (0.15.0)
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-relative-links (0.6.1)
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-remote-theme (0.4.1)
|
||||
addressable (~> 2.0)
|
||||
jekyll (>= 3.5, < 5.0)
|
||||
rubyzip (>= 1.3.0)
|
||||
jekyll-sass-converter (1.5.2)
|
||||
sass (~> 3.4)
|
||||
jekyll-seo-tag (2.5.0)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-sitemap (1.2.0)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-swiss (0.4.0)
|
||||
jekyll-seo-tag (2.6.1)
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-sitemap (1.4.0)
|
||||
jekyll (>= 3.7, < 5.0)
|
||||
jekyll-swiss (1.0.0)
|
||||
jekyll-theme-architect (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
|
|
@ -170,8 +170,8 @@ GEM
|
|||
jekyll-theme-modernist (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-primer (0.5.3)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-theme-primer (0.5.4)
|
||||
jekyll (> 3.5, < 5.0)
|
||||
jekyll-github-metadata (~> 2.9)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-theme-slate (0.1.1)
|
||||
|
|
@ -183,60 +183,60 @@ GEM
|
|||
jekyll-theme-time-machine (0.1.1)
|
||||
jekyll (~> 3.5)
|
||||
jekyll-seo-tag (~> 2.0)
|
||||
jekyll-titles-from-headings (0.5.1)
|
||||
jekyll (~> 3.3)
|
||||
jekyll-watch (2.1.2)
|
||||
jekyll-titles-from-headings (0.5.3)
|
||||
jekyll (>= 3.3, < 5.0)
|
||||
jekyll-watch (2.2.1)
|
||||
listen (~> 3.0)
|
||||
jemoji (0.10.1)
|
||||
jemoji (0.11.1)
|
||||
gemoji (~> 3.0)
|
||||
html-pipeline (~> 2.2)
|
||||
jekyll (~> 3.0)
|
||||
jekyll (>= 3.0, < 5.0)
|
||||
kramdown (1.17.0)
|
||||
liquid (4.0.0)
|
||||
listen (3.1.5)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
ruby_dep (~> 1.2)
|
||||
liquid (4.0.3)
|
||||
listen (3.2.1)
|
||||
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||
rb-inotify (~> 0.9, >= 0.9.10)
|
||||
mercenary (0.3.6)
|
||||
mini_portile2 (2.3.0)
|
||||
minima (2.5.0)
|
||||
jekyll (~> 3.5)
|
||||
mini_portile2 (2.4.0)
|
||||
minima (2.5.1)
|
||||
jekyll (>= 3.5, < 5.0)
|
||||
jekyll-feed (~> 0.9)
|
||||
jekyll-seo-tag (~> 2.1)
|
||||
minitest (5.11.3)
|
||||
multipart-post (2.0.0)
|
||||
nokogiri (1.8.5)
|
||||
mini_portile2 (~> 2.3.0)
|
||||
octokit (4.13.0)
|
||||
minitest (5.14.1)
|
||||
multipart-post (2.1.1)
|
||||
nokogiri (1.10.9)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
octokit (4.16.0)
|
||||
faraday (>= 0.9)
|
||||
sawyer (~> 0.8.0, >= 0.5.3)
|
||||
pathutil (0.16.1)
|
||||
pathutil (0.16.2)
|
||||
forwardable-extended (~> 2.6)
|
||||
public_suffix (2.0.5)
|
||||
public_suffix (3.1.1)
|
||||
rb-fsevent (0.10.3)
|
||||
rb-inotify (0.9.10)
|
||||
ffi (>= 0.5.0, < 2)
|
||||
rouge (2.2.1)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rouge (3.13.0)
|
||||
ruby-enum (0.7.2)
|
||||
i18n
|
||||
ruby_dep (1.5.0)
|
||||
rubyzip (1.2.2)
|
||||
safe_yaml (1.0.4)
|
||||
sass (3.6.0)
|
||||
rubyzip (2.2.0)
|
||||
safe_yaml (1.0.5)
|
||||
sass (3.7.4)
|
||||
sass-listen (~> 4.0.0)
|
||||
sass-listen (4.0.0)
|
||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||
rb-inotify (~> 0.9, >= 0.9.7)
|
||||
sawyer (0.8.1)
|
||||
addressable (>= 2.3.5, < 2.6)
|
||||
faraday (~> 0.8, < 1.0)
|
||||
sawyer (0.8.2)
|
||||
addressable (>= 2.3.5)
|
||||
faraday (> 0.8, < 2.0)
|
||||
terminal-table (1.8.0)
|
||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||
thread_safe (0.3.6)
|
||||
typhoeus (1.3.0)
|
||||
typhoeus (1.3.1)
|
||||
ethon (>= 0.9.0)
|
||||
tzinfo (1.2.5)
|
||||
tzinfo (1.2.7)
|
||||
thread_safe (~> 0.1)
|
||||
unicode-display_width (1.4.0)
|
||||
unicode-display_width (1.6.1)
|
||||
zeitwerk (2.3.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
|
@ -245,4 +245,4 @@ DEPENDENCIES
|
|||
github-pages
|
||||
|
||||
BUNDLED WITH
|
||||
1.16.6
|
||||
2.1.2
|
||||
|
|
|
|||
83
README.md
83
README.md
|
|
@ -1,59 +1,98 @@
|
|||
# Awesome Prometheus Alerts [](https://awesome.re)
|
||||
# 👋 Awesome Prometheus Alerts [](https://awesome.re)
|
||||
|
||||
> Most alerting rules are common to any Prometheus setup. We need a place to find them. 🤘 🚨 📊
|
||||
> Most alerting rules are common to every Prometheus setup. We need a place to find them all. 🤘 🚨 📊
|
||||
|
||||
Collection available here: **[https://awesome-prometheus-alerts.grep.to](https://awesome-prometheus-alerts.grep.to)**
|
||||
|
||||
## Contents
|
||||
## ✨ Contents
|
||||
|
||||
- [Rules](#rules)
|
||||
- [Improvements](#improvements)
|
||||
- [Rules](#-rules)
|
||||
- [Contributing](#-contributing)
|
||||
- [Improvements](#-improvements)
|
||||
- [Help us](#-show-your-support)
|
||||
- [License](#-license)
|
||||
|
||||
## Rules
|
||||
## 🚨 Rules
|
||||
|
||||
- [Prometheus](https://awesome-prometheus-alerts.grep.to/rules#prometheus)
|
||||
- [Host](https://awesome-prometheus-alerts.grep.to/rules#host)
|
||||
#### Basic resource monitoring
|
||||
|
||||
- [Prometheus self-monitoring](https://awesome-prometheus-alerts.grep.to/rules#prometheus-internals)
|
||||
- [Host/Hardware](https://awesome-prometheus-alerts.grep.to/rules#host-and-hardware)
|
||||
- [Docker Containers](https://awesome-prometheus-alerts.grep.to/rules#docker-containers)
|
||||
- [Nginx](https://awesome-prometheus-alerts.grep.to/rules#nginx)
|
||||
- [RabbitMQ](https://awesome-prometheus-alerts.grep.to/rules#rabbitmq)
|
||||
- [Blackbox](https://awesome-prometheus-alerts.grep.to/rules#blackbox)
|
||||
- [Windows](https://awesome-prometheus-alerts.grep.to/rules#windows-server)
|
||||
|
||||
#### Databases and brokers
|
||||
|
||||
- [MySQL](https://awesome-prometheus-alerts.grep.to/rules#mysql)
|
||||
- [PostgreSQL](https://awesome-prometheus-alerts.grep.to/rules#postgresql)
|
||||
- [PGBouncer](https://awesome-prometheus-alerts.grep.to/rules#pgbouncer)
|
||||
- [Redis](https://awesome-prometheus-alerts.grep.to/rules#redis)
|
||||
- [MongoDB](https://awesome-prometheus-alerts.grep.to/rules#mongodb)
|
||||
- [RabbitMQ](https://awesome-prometheus-alerts.grep.to/rules#rabbitmq)
|
||||
- [Elasticsearch](https://awesome-prometheus-alerts.grep.to/rules#elasticsearch)
|
||||
- [Cassandra](https://awesome-prometheus-alerts.grep.to/rules#cassandra)
|
||||
- [Zookeeper](https://awesome-prometheus-alerts.grep.to/rules#zookeeper)
|
||||
- [Kafka](https://awesome-prometheus-alerts.grep.to/rules#kafka)
|
||||
|
||||
#### Reverse proxies and load balancers
|
||||
|
||||
- [Nginx](https://awesome-prometheus-alerts.grep.to/rules#nginx)
|
||||
- [Apache](https://awesome-prometheus-alerts.grep.to/rules#apache)
|
||||
- [HaProxy](https://awesome-prometheus-alerts.grep.to/rules#haproxy)
|
||||
- [Traefik](https://awesome-prometheus-alerts.grep.to/rules#traefik)
|
||||
|
||||
#### Runtimes
|
||||
|
||||
- [PHP-FPM](https://awesome-prometheus-alerts.grep.to/rules#php-fpm)
|
||||
- [Java-Client](https://awesome-prometheus-alerts.grep.to/rules#java-client)
|
||||
- [ZFS](https://awesome-prometheus-alerts.grep.to/rules#zfs)
|
||||
- [JVM](https://awesome-prometheus-alerts.grep.to/rules#jvm)
|
||||
- [Sidekiq](https://awesome-prometheus-alerts.grep.to/rules#sidekiq)
|
||||
|
||||
#### Orchestrators
|
||||
- [Kubernetes](https://awesome-prometheus-alerts.grep.to/rules#kubernetes)
|
||||
- [Nomad](https://awesome-prometheus-alerts.grep.to/rules#nomad)
|
||||
- [Consul](https://awesome-prometheus-alerts.grep.to/rules#consul)
|
||||
- [Etcd](https://awesome-prometheus-alerts.grep.to/rules#etcd)
|
||||
- [Zookeeper](https://awesome-prometheus-alerts.grep.to/rules#zookeeper)
|
||||
- [Kafka](https://awesome-prometheus-alerts.grep.to/rules#kafka)
|
||||
- [Linkerd](https://awesome-prometheus-alerts.grep.to/rules#linkerd)
|
||||
- [Istio](https://awesome-prometheus-alerts.grep.to/rules#istio)
|
||||
- [Blackbox](https://awesome-prometheus-alerts.grep.to/rules#blackbox)
|
||||
- [Windows](https://awesome-prometheus-alerts.grep.to/rules#windows-server)
|
||||
|
||||
#### Network and storage
|
||||
|
||||
- [Ceph](https://awesome-prometheus-alerts.grep.to/rules#ceph)
|
||||
- [ZFS](https://awesome-prometheus-alerts.grep.to/rules#zfs)
|
||||
- [OpenEBS](https://awesome-prometheus-alerts.grep.to/rules#openebs)
|
||||
- [Minio](https://awesome-prometheus-alerts.grep.to/rules#minio)
|
||||
- [Juniper](https://awesome-prometheus-alerts.grep.to/rules#juniper)
|
||||
- [CoreDNS](https://awesome-prometheus-alerts.grep.to/rules#coredns)
|
||||
|
||||
## Contributing
|
||||
#### Other
|
||||
|
||||
Contributions for common alerting rules are most welcome!
|
||||
- [Thanos](https://awesome-prometheus-alerts.grep.to/rules#thanos)
|
||||
|
||||
For few months, many exporters have changed metric names, in order to follow community conventions.
|
||||
Please create an issue or a small pull-request with corrected metric name. 🙏
|
||||
## 🤝 Contributing
|
||||
|
||||
Contributions from community (you!) are most welcome!
|
||||
|
||||
There are many ways to contribute: writing code, alerting rules, documentation, reporting issues, discussing better error tracking...
|
||||
|
||||
[Instructions here](CONTRIBUTING.md)
|
||||
|
||||
## Improvements
|
||||
## 🏋️ Improvements
|
||||
|
||||
- Create an alert rule builder in Jekyll for custom alerts (severity, thresholds, instances...)
|
||||
- Add resolution suggestions to rule descriptions, for faster incident resolution ([#85](https://github.com/samber/awesome-prometheus-alerts/issues/85)).
|
||||
|
||||
## License
|
||||
## 💫 Show your support
|
||||
|
||||
Give a ⭐️ if this project helped you!
|
||||
|
||||
[](https://www.patreon.com/samber)
|
||||
|
||||
## 👏 Thanks
|
||||
|
||||
Gratitude for the Gitlab operation team that provided 50+ rules. \o/
|
||||
|
||||
## 📝 License
|
||||
|
||||
[](https://creativecommons.org/licenses/by/4.0/legalcode)
|
||||
|
||||
|
|
|
|||
1893
_data/rules.yml
1893
_data/rules.yml
File diff suppressed because it is too large
Load diff
|
|
@ -1,73 +1,138 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ site.lang | default: "en-US" }}">
|
||||
<head>
|
||||
|
||||
{% if site.google_analytics %}
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', '{{ site.google_analytics }}');
|
||||
</script>
|
||||
{% endif %}
|
||||
<meta charset="UTF-8">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
{% seo %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="theme-color" content="#157878">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
|
||||
<link rel="stylesheet" href="{{ '/assets/css/app.css?v=' | append: site.github.build_revision | relative_url }}">
|
||||
<link rel="icon" type="image/png" href="/assets/favicon.ico">
|
||||
|
||||
{% seo %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="theme-color" content="#157878">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
|
||||
<link rel="icon" type="image/png" href="/assets/favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
#skip-to-content {
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js"></script>
|
||||
<script src="{{ '/assets/js/app.js?v=' | append: site.github.build_revision | relative_url }}"></script>
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-118604063-2"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
|
||||
function gtag() {
|
||||
dataLayer.push(arguments);
|
||||
}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', 'UA-118604063-2');
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<style>
|
||||
#skip-to-content {
|
||||
height: 1px;
|
||||
width: 1px;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
top: -10px;
|
||||
|
||||
&:focus {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
height: auto;
|
||||
width: auto;
|
||||
background: invert($body-link-color);
|
||||
outline: thick solid invert($body-link-color);
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
left: 10px;
|
||||
height: auto;
|
||||
width: auto;
|
||||
background: invert($body-link-color);
|
||||
outline: thick solid invert($body-link-color);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<a id="skip-to-content" href="#content">Skip to the content.</a>
|
||||
}
|
||||
|
||||
<header class="page-header" role="banner">
|
||||
<h1 class="project-name">
|
||||
<a href="/" style="color: white">
|
||||
{{ site.title | default: site.github.repository_name }}
|
||||
</a>
|
||||
</h1>
|
||||
<h2 class="project-tagline">{{ site.description | default: site.github.project_tagline }}</h2>
|
||||
<a href="/alertmanager" class="btn">AlertManager config</a>
|
||||
<a href="/rules" class="btn">Rules</a>
|
||||
ul.github-buttons-cta li {
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
padding: 0px 15px;
|
||||
}
|
||||
|
||||
ul.github-buttons-cta li a {
|
||||
/* width: 100px; */
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.fa {
|
||||
/* padding: 14px;
|
||||
width: 50px;
|
||||
height: 50px; */
|
||||
font-size: 25px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.fa:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.fa-twitter,
|
||||
.fa-linkedin {
|
||||
/* background: #55ACEE; */
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
<a id="skip-to-content" href="#content">Skip to the content.</a>
|
||||
|
||||
<header class="page-header" role="banner">
|
||||
<h1 class="project-name">
|
||||
<a href="/" style="color: white">
|
||||
{{ site.title | default: site.github.repository_name }}
|
||||
</a>
|
||||
</h1>
|
||||
<h2 class="project-tagline">{{ site.description | default: site.github.project_tagline }}</h2>
|
||||
<a href="/alertmanager" class="btn">AlertManager config</a>
|
||||
<a href="/rules" class="btn">Rules</a>
|
||||
<a href="https://github.com/samber/awesome-prometheus-alerts/blob/master/CONTRIBUTING.md" class="btn">Contribute on
|
||||
GitHub
|
||||
</a>
|
||||
|
||||
<ul class="github-buttons-cta">
|
||||
<li>
|
||||
<iframe
|
||||
src="https://ghbtns.com/github-btn.html?user=samber&repo=awesome-prometheus-alerts&type=watch&count=true&v=2"
|
||||
frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
|
||||
</li>
|
||||
<li>
|
||||
<iframe src="https://ghbtns.com/github-btn.html?user=samber&repo=awesome-prometheus-alerts&type=star&count=true"
|
||||
frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
|
||||
</li>
|
||||
<li>
|
||||
<iframe
|
||||
src="https://ghbtns.com/github-btn.html?user=samber&repo=awesome-prometheus-alerts&type=fork&count=true&v=2"
|
||||
frameborder="0" scrolling="0" width="100px" height="20px"></iframe>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://twitter.com/share?via=samber&related=samber&text=🚨 📊 Here is a collection of Awesome Prometheus Alerts&url=https://awesome-prometheus-alerts.grep.to"
|
||||
class="fa fa-twitter" target="_blank"></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://www.linkedin.com/shareArticle?mini=true&url=https://awesome-prometheus-alerts.grep.to"
|
||||
class="fa fa-linkedin" target="_blank"></a>
|
||||
</li>
|
||||
</ul>
|
||||
</header>
|
||||
|
||||
<main id="content" class="main-content" role="main">
|
||||
{{ content }}
|
||||
|
||||
<footer class="site-footer">
|
||||
{% if site.github.is_project_page %}
|
||||
<a href="{{ site.github.repository_url }}" class="btn">View on GitHub</a>
|
||||
<span class="site-footer-owner"><a href="{{ site.github.repository_url }}">{{ site.title }}</a> is maintained by
|
||||
<a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a>.</span>
|
||||
{% endif %}
|
||||
{% if site.show_downloads %}
|
||||
<a href="{{ site.github.zip_url }}" class="btn">Download .zip</a>
|
||||
<a href="{{ site.github.tar_url }}" class="btn">Download .tar.gz</a>
|
||||
{% endif %}
|
||||
</header>
|
||||
</footer>
|
||||
</main>
|
||||
</body>
|
||||
|
||||
<main id="content" class="main-content" role="main">
|
||||
{{ content }}
|
||||
|
||||
<footer class="site-footer">
|
||||
{% if site.github.is_project_page %}
|
||||
<span class="site-footer-owner"><a href="{{ site.github.repository_url }}">{{ site.title }}</a> is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a>.</span>
|
||||
{% endif %}
|
||||
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.</span>
|
||||
</footer>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
@ -1,3 +1,39 @@
|
|||
<h2>
|
||||
Prometheus configuration
|
||||
</h2>
|
||||
|
||||
{% highlight yaml %}
|
||||
# prometheus.yml
|
||||
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
...
|
||||
|
||||
rule_files:
|
||||
- 'alerts/*.yml'
|
||||
|
||||
scrape_configs:
|
||||
...
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% highlight yaml %}
|
||||
# alerts/example-redis.yml
|
||||
|
||||
groups:
|
||||
|
||||
- name: ExampleRedisGroup
|
||||
rules:
|
||||
- alert: ExampleRedisDown
|
||||
expr: redis_up{} == 0
|
||||
for: 2m
|
||||
labels:
|
||||
severity: critical
|
||||
annotations:
|
||||
summary: "Redis instance down"
|
||||
description: "Whatever"
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
<h2>
|
||||
AlertManager configuration
|
||||
|
|
@ -15,7 +51,7 @@ route:
|
|||
# notification.
|
||||
group_wait: 10s
|
||||
|
||||
# When the first notification was sent, wait 'group_interval' to send a betch
|
||||
# When the first notification was sent, wait 'group_interval' to send a batch
|
||||
# of new alerts that started firing for that group.
|
||||
group_interval: 5m
|
||||
|
||||
|
|
@ -32,13 +68,13 @@ route:
|
|||
- receiver: "slack"
|
||||
group_wait: 10s
|
||||
match_re:
|
||||
severity: error|warning
|
||||
severity: critical|warning
|
||||
continue: true
|
||||
|
||||
- receiver: "sms"
|
||||
- receiver: "pager"
|
||||
group_wait: 10s
|
||||
match_re:
|
||||
severity: error
|
||||
severity: critial
|
||||
continue: true
|
||||
|
||||
receivers:
|
||||
|
|
@ -49,9 +85,9 @@ receivers:
|
|||
channel: 'monitoring'
|
||||
text: "{{ range .Alerts }}<!channel> {{ .Annotations.summary }}\n{{ .Annotations.description }}\n{{ end }}"
|
||||
|
||||
- name: "sms"
|
||||
- name: "pager"
|
||||
webhook_config:
|
||||
- url: http://a.b.c:8080/send/sms
|
||||
- url: http://a.b.c.d:8080/send/sms
|
||||
send_resolved: true
|
||||
|
||||
{% endraw %}
|
||||
|
|
|
|||
11
assets/css/app.css
Normal file
11
assets/css/app.css
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
.clipboard-single,
|
||||
.clipboard-multiple {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
color: #606c71;
|
||||
}
|
||||
|
||||
details summary {
|
||||
cursor: pointer;
|
||||
}
|
||||
16
assets/js/app.js
Normal file
16
assets/js/app.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
$(function () {
|
||||
var clipboardRules = new ClipboardJS('.clipboard-single', {
|
||||
text: function (trigger) {
|
||||
const id = trigger.getAttribute('data-clipboard-target-id');
|
||||
const html = $("#" + id + " .highlight");
|
||||
return html.text();
|
||||
},
|
||||
});
|
||||
var clipboardCategories = new ClipboardJS('.clipboard-multiple', {
|
||||
text: function (trigger) {
|
||||
const id = trigger.getAttribute('data-clipboard-target-id');
|
||||
const html = $("[id^=" + id + "] .highlight");
|
||||
return html.append("\n\n").text();
|
||||
},
|
||||
});
|
||||
});
|
||||
11
docker-compose.yml
Normal file
11
docker-compose.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
|
||||
jekyll:
|
||||
image: jekyll/jekyll:latest
|
||||
command: jekyll serve
|
||||
volumes:
|
||||
- ./:/srv/jekyll
|
||||
ports:
|
||||
- 4000:4000
|
||||
28
index.md
28
index.md
|
|
@ -20,15 +20,31 @@
|
|||
</a>
|
||||
|
||||
<h2>
|
||||
Prometheus alerting rules
|
||||
Out of the box prometheus alerting rules
|
||||
</h2>
|
||||
|
||||
<ul>
|
||||
{% for service in site.data.rules.services %}
|
||||
<li>
|
||||
<a href="/rules#{{ service.name | replace: " ", "-" | downcase }}">
|
||||
{{ service.name }}
|
||||
</a>
|
||||
{% for group in site.data.rules.groups %}
|
||||
<li style="margin-top: 30px;">
|
||||
{% assign nbrRules = 0 %}
|
||||
{% for service in group.services %}
|
||||
{% for exporter in service.exporters %}
|
||||
{% for rule in exporter.rules %}
|
||||
{% assign nbrRules = nbrRules | plus: 1 %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
<h3>{{ group.name }} <small style="margin-left: 20px;">({{ nbrRules }} rules)</small></h3>
|
||||
<ul>
|
||||
{% for service in group.services %}
|
||||
<li>
|
||||
<a href="/rules#{{ service.name | replace: " ", "-" | downcase }}">
|
||||
{{ service.name }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
167
rules.md
167
rules.md
|
|
@ -4,102 +4,101 @@
|
|||
}
|
||||
</style>
|
||||
|
||||
{% highlight yaml %}
|
||||
# prometheus.yml
|
||||
<div style="padding: 20px 20px 10px 20px; border: solid grey 1px; border-radius: 10px;">
|
||||
<h2 style="text-align:center;">⚠️ Caution ⚠️</h2>
|
||||
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
...
|
||||
<p style="text-align:center;">
|
||||
Alert thresholds depend on nature of applications.
|
||||
<br>
|
||||
Some queries in this page may have arbitrary tolerance threshold.
|
||||
<br><br>
|
||||
Building an efficient and battle-tested monitoring platform takes time. 😉
|
||||
</p>
|
||||
</div>
|
||||
|
||||
rule_files:
|
||||
- 'alerts/*.yml'
|
||||
<br>
|
||||
<br>
|
||||
|
||||
scrape_configs:
|
||||
...
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
{% highlight yaml %}
|
||||
# alerts/example-redis.yml
|
||||
|
||||
groups:
|
||||
|
||||
- name: ExampleRedisGroup
|
||||
rules:
|
||||
- alert: ExampleRedisDown
|
||||
expr: redis_up{} == 0
|
||||
for: 2m
|
||||
labels:
|
||||
severity: error
|
||||
annotations:
|
||||
summary: "Redis instance ($instance) down"
|
||||
description: "Whatever"
|
||||
|
||||
{% endhighlight %}
|
||||
<h1></h1>
|
||||
|
||||
<ul>
|
||||
{% for service in site.data.rules.services %}
|
||||
{% assign serviceIndex = forloop.index %}
|
||||
{% for exporter in service.exporters %}
|
||||
<li>
|
||||
<h2 id="{{ service.name | replace: " ", "-" | downcase }}">
|
||||
{{ serviceIndex }}.
|
||||
{{ service.name }}
|
||||
{% if exporter.name %}
|
||||
:
|
||||
{% if exporter.doc_url %}
|
||||
<a href="{{ exporter.doc_url }}">
|
||||
{{ exporter.name }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ exporter.name }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</h2>
|
||||
|
||||
{% for group in site.data.rules.groups %}
|
||||
{% assign groupIndex = forloop.index %}
|
||||
{% for service in group.services %}
|
||||
{% assign serviceIndex = forloop.index %}
|
||||
{% for exporter in service.exporters %}
|
||||
{% assign nbrRules = exporter.rules | size %}
|
||||
{% if nbrRules == 0 %}
|
||||
{% highlight javascript %}
|
||||
// @TODO
|
||||
{% endhighlight %}
|
||||
{% endif %}
|
||||
<li>
|
||||
{% assign serviceId = service.name | replace: " ", "-" | downcase %}
|
||||
<h2 id="{{ serviceId }}">
|
||||
{{ groupIndex }}.
|
||||
{{ serviceIndex }}.
|
||||
{{ service.name }}
|
||||
{% if exporter.name %}:
|
||||
{% if exporter.doc_url %}
|
||||
<a href="{{ exporter.doc_url }}">
|
||||
{{ exporter.name }}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ exporter.name }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<ul>
|
||||
{% for rule in exporter.rules %}
|
||||
{% assign ruleIndex = forloop.index %}
|
||||
<li>
|
||||
<h4>
|
||||
{{ serviceIndex }}.{{ ruleIndex }}.
|
||||
{{ rule.name }}
|
||||
</h4>
|
||||
<details {% if true || (serviceIndex == 1 && ruleIndex == 1) %} open {% endif %}>
|
||||
<summary>{{ rule.description }}</summary>
|
||||
<p>
|
||||
{% if nbrRules > 0 %}
|
||||
<small style="font-size: 60%; vertical-align: middle; margin-left: 10px;">
|
||||
({{ nbrRules }} rules)
|
||||
</small>
|
||||
<span class="clipboard-multiple" data-clipboard-target-id="group-{{ groupIndex }}-service-{{ serviceIndex }}">[copy all]</span>
|
||||
{% endif %}
|
||||
</h2>
|
||||
|
||||
{% assign ruleName = rule.name | split: ' ' %}
|
||||
{% capture ruleNameCamelcase %}{% for word in ruleName %}{{ word | capitalize }} {% endfor %}{% endcapture %}
|
||||
{% if nbrRules == 0 %}
|
||||
{% highlight javascript %}
|
||||
// @TODO: Please contribute => https://github.com/samber/awesome-prometheus-alerts 👋
|
||||
{% endhighlight %}
|
||||
{% endif %}
|
||||
|
||||
{% highlight yaml %}
|
||||
- alert: {{ ruleNameCamelcase | remove: ' ' }}
|
||||
expr: {{ rule.query }}
|
||||
for: 5m
|
||||
labels:
|
||||
severity: {{ rule.severity }}
|
||||
annotations:
|
||||
summary: "{{ rule.name }} (instance {% raw %}{{ $labels.instance }}{% endraw %})"
|
||||
description: "{{ rule.description }}\n VALUE = {% raw %}{{ $value }}{% endraw %}\n LABELS: {% raw %}{{ $labels }}{% endraw %}"
|
||||
<ul>
|
||||
{% for rule in exporter.rules %}
|
||||
{% assign ruleIndex = forloop.index %}
|
||||
{% assign comments = rule.comments | strip | newline_to_br | split: '<br />' %}
|
||||
<li>
|
||||
<h4>
|
||||
{{ groupIndex}}.{{ serviceIndex }}.{{ ruleIndex }}.
|
||||
{{ rule.name }}
|
||||
</h4>
|
||||
<details id="group-{{ groupIndex }}-service-{{ serviceIndex }}-rule-{{ ruleIndex }}" open="">
|
||||
<summary>
|
||||
{{ rule.description }}
|
||||
<span class="clipboard-single" data-clipboard-target-id="group-{{ groupIndex }}-service-{{ serviceIndex }}-rule-{{ ruleIndex }}" onclick="event.preventDefault();">[copy]</span>
|
||||
</summary>
|
||||
<p>
|
||||
{% assign ruleName = rule.name | split: ' ' %}
|
||||
{% capture ruleNameCamelcase %}{% for word in ruleName %}{{ word | capitalize }} {% endfor %}{% endcapture %}
|
||||
|
||||
{% highlight yaml %}
|
||||
{% for comment in comments %}# {{ comment | strip }}
|
||||
{% endfor %}- alert: {{ ruleNameCamelcase | remove: ' ' }}
|
||||
expr: {{ rule.query }}
|
||||
for: 5m
|
||||
labels:
|
||||
severity: {{ rule.severity }}
|
||||
annotations:
|
||||
summary: "{{ rule.name }} (instance {% raw %}{{ $labels.instance }}{% endraw %})"
|
||||
description: "{{ rule.description }}\n VALUE = {% raw %}{{ $value }}{% endraw %}\n LABELS: {% raw %}{{ $labels }}{% endraw %}"
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
</p>
|
||||
</details>
|
||||
<br/>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</p>
|
||||
</details>
|
||||
<br/>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<hr/>
|
||||
</li>
|
||||
{% endfor %}
|
||||
<hr/>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Reference in a new issue