mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-23 18:06:58 +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
|
## 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`.
|
Rules are here: `_data/rules.yml`.
|
||||||
|
|
||||||
## Run localy
|
### Guidelines
|
||||||
|
|
||||||
```
|
|
||||||
gem install bundler
|
|
||||||
bundle install
|
|
||||||
bundle exec jekyll serve
|
|
||||||
```
|
|
||||||
|
|
||||||
## Guidelines
|
|
||||||
|
|
||||||
Please ensure your pull request adheres to the following 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.
|
- Search previous suggestions before making a new one, as yours may be a duplicate.
|
||||||
- Keep descriptions short and simple, but descriptive.
|
- 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.
|
- 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
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activesupport (4.2.10)
|
activesupport (6.0.3.1)
|
||||||
i18n (~> 0.7)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
|
i18n (>= 0.7, < 2)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
thread_safe (~> 0.3, >= 0.3.4)
|
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
addressable (2.5.2)
|
zeitwerk (~> 2.2, >= 2.2.2)
|
||||||
public_suffix (>= 2.0.2, < 4.0)
|
addressable (2.7.0)
|
||||||
|
public_suffix (>= 2.0.2, < 5.0)
|
||||||
coffee-script (2.4.1)
|
coffee-script (2.4.1)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
|
|
@ -15,43 +16,42 @@ GEM
|
||||||
colorator (1.1.0)
|
colorator (1.1.0)
|
||||||
commonmarker (0.17.13)
|
commonmarker (0.17.13)
|
||||||
ruby-enum (~> 0.5)
|
ruby-enum (~> 0.5)
|
||||||
concurrent-ruby (1.0.5)
|
concurrent-ruby (1.1.6)
|
||||||
dnsruby (1.61.2)
|
dnsruby (1.61.3)
|
||||||
addressable (~> 2.5)
|
addressable (~> 2.5)
|
||||||
em-websocket (0.5.1)
|
em-websocket (0.5.1)
|
||||||
eventmachine (>= 0.12.9)
|
eventmachine (>= 0.12.9)
|
||||||
http_parser.rb (~> 0.6.0)
|
http_parser.rb (~> 0.6.0)
|
||||||
ethon (0.11.0)
|
ethon (0.12.0)
|
||||||
ffi (>= 1.3.0)
|
ffi (>= 1.3.0)
|
||||||
eventmachine (1.2.7)
|
eventmachine (1.2.7)
|
||||||
execjs (2.7.0)
|
execjs (2.7.0)
|
||||||
faraday (0.15.3)
|
faraday (1.0.0)
|
||||||
multipart-post (>= 1.2, < 3)
|
multipart-post (>= 1.2, < 3)
|
||||||
ffi (1.9.25)
|
ffi (1.12.2)
|
||||||
forwardable-extended (2.6.0)
|
forwardable-extended (2.6.0)
|
||||||
gemoji (3.0.0)
|
gemoji (3.0.1)
|
||||||
github-pages (192)
|
github-pages (204)
|
||||||
activesupport (= 4.2.10)
|
github-pages-health-check (= 1.16.1)
|
||||||
github-pages-health-check (= 1.8.1)
|
jekyll (= 3.8.5)
|
||||||
jekyll (= 3.7.4)
|
jekyll-avatar (= 0.7.0)
|
||||||
jekyll-avatar (= 0.6.0)
|
|
||||||
jekyll-coffeescript (= 1.1.1)
|
jekyll-coffeescript (= 1.1.1)
|
||||||
jekyll-commonmark-ghpages (= 0.1.5)
|
jekyll-commonmark-ghpages (= 0.1.6)
|
||||||
jekyll-default-layout (= 0.1.4)
|
jekyll-default-layout (= 0.1.4)
|
||||||
jekyll-feed (= 0.10.0)
|
jekyll-feed (= 0.13.0)
|
||||||
jekyll-gist (= 1.5.0)
|
jekyll-gist (= 1.5.0)
|
||||||
jekyll-github-metadata (= 2.9.4)
|
jekyll-github-metadata (= 2.13.0)
|
||||||
jekyll-mentions (= 1.4.1)
|
jekyll-mentions (= 1.5.1)
|
||||||
jekyll-optional-front-matter (= 0.3.0)
|
jekyll-optional-front-matter (= 0.3.2)
|
||||||
jekyll-paginate (= 1.1.0)
|
jekyll-paginate (= 1.1.0)
|
||||||
jekyll-readme-index (= 0.2.0)
|
jekyll-readme-index (= 0.3.0)
|
||||||
jekyll-redirect-from (= 0.14.0)
|
jekyll-redirect-from (= 0.15.0)
|
||||||
jekyll-relative-links (= 0.5.3)
|
jekyll-relative-links (= 0.6.1)
|
||||||
jekyll-remote-theme (= 0.3.1)
|
jekyll-remote-theme (= 0.4.1)
|
||||||
jekyll-sass-converter (= 1.5.2)
|
jekyll-sass-converter (= 1.5.2)
|
||||||
jekyll-seo-tag (= 2.5.0)
|
jekyll-seo-tag (= 2.6.1)
|
||||||
jekyll-sitemap (= 1.2.0)
|
jekyll-sitemap (= 1.4.0)
|
||||||
jekyll-swiss (= 0.4.0)
|
jekyll-swiss (= 1.0.0)
|
||||||
jekyll-theme-architect (= 0.1.1)
|
jekyll-theme-architect (= 0.1.1)
|
||||||
jekyll-theme-cayman (= 0.1.1)
|
jekyll-theme-cayman (= 0.1.1)
|
||||||
jekyll-theme-dinky (= 0.1.1)
|
jekyll-theme-dinky (= 0.1.1)
|
||||||
|
|
@ -61,33 +61,32 @@ GEM
|
||||||
jekyll-theme-midnight (= 0.1.1)
|
jekyll-theme-midnight (= 0.1.1)
|
||||||
jekyll-theme-minimal (= 0.1.1)
|
jekyll-theme-minimal (= 0.1.1)
|
||||||
jekyll-theme-modernist (= 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-slate (= 0.1.1)
|
||||||
jekyll-theme-tactile (= 0.1.1)
|
jekyll-theme-tactile (= 0.1.1)
|
||||||
jekyll-theme-time-machine (= 0.1.1)
|
jekyll-theme-time-machine (= 0.1.1)
|
||||||
jekyll-titles-from-headings (= 0.5.1)
|
jekyll-titles-from-headings (= 0.5.3)
|
||||||
jemoji (= 0.10.1)
|
jemoji (= 0.11.1)
|
||||||
kramdown (= 1.17.0)
|
kramdown (= 1.17.0)
|
||||||
liquid (= 4.0.0)
|
liquid (= 4.0.3)
|
||||||
listen (= 3.1.5)
|
|
||||||
mercenary (~> 0.3)
|
mercenary (~> 0.3)
|
||||||
minima (= 2.5.0)
|
minima (= 2.5.1)
|
||||||
nokogiri (>= 1.8.2, < 2.0)
|
nokogiri (>= 1.10.4, < 2.0)
|
||||||
rouge (= 2.2.1)
|
rouge (= 3.13.0)
|
||||||
terminal-table (~> 1.4)
|
terminal-table (~> 1.4)
|
||||||
github-pages-health-check (1.8.1)
|
github-pages-health-check (1.16.1)
|
||||||
addressable (~> 2.3)
|
addressable (~> 2.3)
|
||||||
dnsruby (~> 1.60)
|
dnsruby (~> 1.60)
|
||||||
octokit (~> 4.0)
|
octokit (~> 4.0)
|
||||||
public_suffix (~> 2.0)
|
public_suffix (~> 3.0)
|
||||||
typhoeus (~> 1.3)
|
typhoeus (~> 1.3)
|
||||||
html-pipeline (2.8.4)
|
html-pipeline (2.12.3)
|
||||||
activesupport (>= 2)
|
activesupport (>= 2)
|
||||||
nokogiri (>= 1.4)
|
nokogiri (>= 1.4)
|
||||||
http_parser.rb (0.6.0)
|
http_parser.rb (0.6.0)
|
||||||
i18n (0.9.5)
|
i18n (0.9.5)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
jekyll (3.7.4)
|
jekyll (3.8.5)
|
||||||
addressable (~> 2.4)
|
addressable (~> 2.4)
|
||||||
colorator (~> 1.0)
|
colorator (~> 1.0)
|
||||||
em-websocket (~> 0.5)
|
em-websocket (~> 0.5)
|
||||||
|
|
@ -100,49 +99,50 @@ GEM
|
||||||
pathutil (~> 0.9)
|
pathutil (~> 0.9)
|
||||||
rouge (>= 1.7, < 4)
|
rouge (>= 1.7, < 4)
|
||||||
safe_yaml (~> 1.0)
|
safe_yaml (~> 1.0)
|
||||||
jekyll-avatar (0.6.0)
|
jekyll-avatar (0.7.0)
|
||||||
jekyll (~> 3.0)
|
jekyll (>= 3.0, < 5.0)
|
||||||
jekyll-coffeescript (1.1.1)
|
jekyll-coffeescript (1.1.1)
|
||||||
coffee-script (~> 2.2)
|
coffee-script (~> 2.2)
|
||||||
coffee-script-source (~> 1.11.1)
|
coffee-script-source (~> 1.11.1)
|
||||||
jekyll-commonmark (1.2.0)
|
jekyll-commonmark (1.3.1)
|
||||||
commonmarker (~> 0.14)
|
commonmarker (~> 0.14)
|
||||||
jekyll (>= 3.0, < 4.0)
|
jekyll (>= 3.7, < 5.0)
|
||||||
jekyll-commonmark-ghpages (0.1.5)
|
jekyll-commonmark-ghpages (0.1.6)
|
||||||
commonmarker (~> 0.17.6)
|
commonmarker (~> 0.17.6)
|
||||||
jekyll-commonmark (~> 1)
|
jekyll-commonmark (~> 1.2)
|
||||||
rouge (~> 2)
|
rouge (>= 2.0, < 4.0)
|
||||||
jekyll-default-layout (0.1.4)
|
jekyll-default-layout (0.1.4)
|
||||||
jekyll (~> 3.0)
|
jekyll (~> 3.0)
|
||||||
jekyll-feed (0.10.0)
|
jekyll-feed (0.13.0)
|
||||||
jekyll (~> 3.3)
|
jekyll (>= 3.7, < 5.0)
|
||||||
jekyll-gist (1.5.0)
|
jekyll-gist (1.5.0)
|
||||||
octokit (~> 4.2)
|
octokit (~> 4.2)
|
||||||
jekyll-github-metadata (2.9.4)
|
jekyll-github-metadata (2.13.0)
|
||||||
jekyll (~> 3.1)
|
jekyll (>= 3.4, < 5.0)
|
||||||
octokit (~> 4.0, != 4.4.0)
|
octokit (~> 4.0, != 4.4.0)
|
||||||
jekyll-mentions (1.4.1)
|
jekyll-mentions (1.5.1)
|
||||||
html-pipeline (~> 2.3)
|
html-pipeline (~> 2.3)
|
||||||
jekyll (~> 3.0)
|
jekyll (>= 3.7, < 5.0)
|
||||||
jekyll-optional-front-matter (0.3.0)
|
jekyll-optional-front-matter (0.3.2)
|
||||||
jekyll (~> 3.0)
|
jekyll (>= 3.0, < 5.0)
|
||||||
jekyll-paginate (1.1.0)
|
jekyll-paginate (1.1.0)
|
||||||
jekyll-readme-index (0.2.0)
|
jekyll-readme-index (0.3.0)
|
||||||
jekyll (~> 3.0)
|
jekyll (>= 3.0, < 5.0)
|
||||||
jekyll-redirect-from (0.14.0)
|
jekyll-redirect-from (0.15.0)
|
||||||
jekyll (~> 3.3)
|
jekyll (>= 3.3, < 5.0)
|
||||||
jekyll-relative-links (0.5.3)
|
jekyll-relative-links (0.6.1)
|
||||||
jekyll (~> 3.3)
|
jekyll (>= 3.3, < 5.0)
|
||||||
jekyll-remote-theme (0.3.1)
|
jekyll-remote-theme (0.4.1)
|
||||||
jekyll (~> 3.5)
|
addressable (~> 2.0)
|
||||||
rubyzip (>= 1.2.1, < 3.0)
|
jekyll (>= 3.5, < 5.0)
|
||||||
|
rubyzip (>= 1.3.0)
|
||||||
jekyll-sass-converter (1.5.2)
|
jekyll-sass-converter (1.5.2)
|
||||||
sass (~> 3.4)
|
sass (~> 3.4)
|
||||||
jekyll-seo-tag (2.5.0)
|
jekyll-seo-tag (2.6.1)
|
||||||
jekyll (~> 3.3)
|
jekyll (>= 3.3, < 5.0)
|
||||||
jekyll-sitemap (1.2.0)
|
jekyll-sitemap (1.4.0)
|
||||||
jekyll (~> 3.3)
|
jekyll (>= 3.7, < 5.0)
|
||||||
jekyll-swiss (0.4.0)
|
jekyll-swiss (1.0.0)
|
||||||
jekyll-theme-architect (0.1.1)
|
jekyll-theme-architect (0.1.1)
|
||||||
jekyll (~> 3.5)
|
jekyll (~> 3.5)
|
||||||
jekyll-seo-tag (~> 2.0)
|
jekyll-seo-tag (~> 2.0)
|
||||||
|
|
@ -170,8 +170,8 @@ GEM
|
||||||
jekyll-theme-modernist (0.1.1)
|
jekyll-theme-modernist (0.1.1)
|
||||||
jekyll (~> 3.5)
|
jekyll (~> 3.5)
|
||||||
jekyll-seo-tag (~> 2.0)
|
jekyll-seo-tag (~> 2.0)
|
||||||
jekyll-theme-primer (0.5.3)
|
jekyll-theme-primer (0.5.4)
|
||||||
jekyll (~> 3.5)
|
jekyll (> 3.5, < 5.0)
|
||||||
jekyll-github-metadata (~> 2.9)
|
jekyll-github-metadata (~> 2.9)
|
||||||
jekyll-seo-tag (~> 2.0)
|
jekyll-seo-tag (~> 2.0)
|
||||||
jekyll-theme-slate (0.1.1)
|
jekyll-theme-slate (0.1.1)
|
||||||
|
|
@ -183,60 +183,60 @@ GEM
|
||||||
jekyll-theme-time-machine (0.1.1)
|
jekyll-theme-time-machine (0.1.1)
|
||||||
jekyll (~> 3.5)
|
jekyll (~> 3.5)
|
||||||
jekyll-seo-tag (~> 2.0)
|
jekyll-seo-tag (~> 2.0)
|
||||||
jekyll-titles-from-headings (0.5.1)
|
jekyll-titles-from-headings (0.5.3)
|
||||||
jekyll (~> 3.3)
|
jekyll (>= 3.3, < 5.0)
|
||||||
jekyll-watch (2.1.2)
|
jekyll-watch (2.2.1)
|
||||||
listen (~> 3.0)
|
listen (~> 3.0)
|
||||||
jemoji (0.10.1)
|
jemoji (0.11.1)
|
||||||
gemoji (~> 3.0)
|
gemoji (~> 3.0)
|
||||||
html-pipeline (~> 2.2)
|
html-pipeline (~> 2.2)
|
||||||
jekyll (~> 3.0)
|
jekyll (>= 3.0, < 5.0)
|
||||||
kramdown (1.17.0)
|
kramdown (1.17.0)
|
||||||
liquid (4.0.0)
|
liquid (4.0.3)
|
||||||
listen (3.1.5)
|
listen (3.2.1)
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
rb-inotify (~> 0.9, >= 0.9.10)
|
||||||
ruby_dep (~> 1.2)
|
|
||||||
mercenary (0.3.6)
|
mercenary (0.3.6)
|
||||||
mini_portile2 (2.3.0)
|
mini_portile2 (2.4.0)
|
||||||
minima (2.5.0)
|
minima (2.5.1)
|
||||||
jekyll (~> 3.5)
|
jekyll (>= 3.5, < 5.0)
|
||||||
jekyll-feed (~> 0.9)
|
jekyll-feed (~> 0.9)
|
||||||
jekyll-seo-tag (~> 2.1)
|
jekyll-seo-tag (~> 2.1)
|
||||||
minitest (5.11.3)
|
minitest (5.14.1)
|
||||||
multipart-post (2.0.0)
|
multipart-post (2.1.1)
|
||||||
nokogiri (1.8.5)
|
nokogiri (1.10.9)
|
||||||
mini_portile2 (~> 2.3.0)
|
mini_portile2 (~> 2.4.0)
|
||||||
octokit (4.13.0)
|
octokit (4.16.0)
|
||||||
|
faraday (>= 0.9)
|
||||||
sawyer (~> 0.8.0, >= 0.5.3)
|
sawyer (~> 0.8.0, >= 0.5.3)
|
||||||
pathutil (0.16.1)
|
pathutil (0.16.2)
|
||||||
forwardable-extended (~> 2.6)
|
forwardable-extended (~> 2.6)
|
||||||
public_suffix (2.0.5)
|
public_suffix (3.1.1)
|
||||||
rb-fsevent (0.10.3)
|
rb-fsevent (0.10.3)
|
||||||
rb-inotify (0.9.10)
|
rb-inotify (0.10.1)
|
||||||
ffi (>= 0.5.0, < 2)
|
ffi (~> 1.0)
|
||||||
rouge (2.2.1)
|
rouge (3.13.0)
|
||||||
ruby-enum (0.7.2)
|
ruby-enum (0.7.2)
|
||||||
i18n
|
i18n
|
||||||
ruby_dep (1.5.0)
|
rubyzip (2.2.0)
|
||||||
rubyzip (1.2.2)
|
safe_yaml (1.0.5)
|
||||||
safe_yaml (1.0.4)
|
sass (3.7.4)
|
||||||
sass (3.6.0)
|
|
||||||
sass-listen (~> 4.0.0)
|
sass-listen (~> 4.0.0)
|
||||||
sass-listen (4.0.0)
|
sass-listen (4.0.0)
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
sawyer (0.8.1)
|
sawyer (0.8.2)
|
||||||
addressable (>= 2.3.5, < 2.6)
|
addressable (>= 2.3.5)
|
||||||
faraday (~> 0.8, < 1.0)
|
faraday (> 0.8, < 2.0)
|
||||||
terminal-table (1.8.0)
|
terminal-table (1.8.0)
|
||||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
typhoeus (1.3.0)
|
typhoeus (1.3.1)
|
||||||
ethon (>= 0.9.0)
|
ethon (>= 0.9.0)
|
||||||
tzinfo (1.2.5)
|
tzinfo (1.2.7)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
unicode-display_width (1.4.0)
|
unicode-display_width (1.6.1)
|
||||||
|
zeitwerk (2.3.0)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
@ -245,4 +245,4 @@ DEPENDENCIES
|
||||||
github-pages
|
github-pages
|
||||||
|
|
||||||
BUNDLED WITH
|
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)**
|
Collection available here: **[https://awesome-prometheus-alerts.grep.to](https://awesome-prometheus-alerts.grep.to)**
|
||||||
|
|
||||||
## Contents
|
## ✨ Contents
|
||||||
|
|
||||||
- [Rules](#rules)
|
- [Rules](#-rules)
|
||||||
- [Improvements](#improvements)
|
- [Contributing](#-contributing)
|
||||||
|
- [Improvements](#-improvements)
|
||||||
|
- [Help us](#-show-your-support)
|
||||||
|
- [License](#-license)
|
||||||
|
|
||||||
## Rules
|
## 🚨 Rules
|
||||||
|
|
||||||
- [Prometheus](https://awesome-prometheus-alerts.grep.to/rules#prometheus)
|
#### Basic resource monitoring
|
||||||
- [Host](https://awesome-prometheus-alerts.grep.to/rules#host)
|
|
||||||
|
- [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)
|
- [Docker Containers](https://awesome-prometheus-alerts.grep.to/rules#docker-containers)
|
||||||
- [Nginx](https://awesome-prometheus-alerts.grep.to/rules#nginx)
|
- [Blackbox](https://awesome-prometheus-alerts.grep.to/rules#blackbox)
|
||||||
- [RabbitMQ](https://awesome-prometheus-alerts.grep.to/rules#rabbitmq)
|
- [Windows](https://awesome-prometheus-alerts.grep.to/rules#windows-server)
|
||||||
|
|
||||||
|
#### Databases and brokers
|
||||||
|
|
||||||
- [MySQL](https://awesome-prometheus-alerts.grep.to/rules#mysql)
|
- [MySQL](https://awesome-prometheus-alerts.grep.to/rules#mysql)
|
||||||
- [PostgreSQL](https://awesome-prometheus-alerts.grep.to/rules#postgresql)
|
- [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)
|
- [Redis](https://awesome-prometheus-alerts.grep.to/rules#redis)
|
||||||
- [MongoDB](https://awesome-prometheus-alerts.grep.to/rules#mongodb)
|
- [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)
|
- [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)
|
- [Apache](https://awesome-prometheus-alerts.grep.to/rules#apache)
|
||||||
- [HaProxy](https://awesome-prometheus-alerts.grep.to/rules#haproxy)
|
- [HaProxy](https://awesome-prometheus-alerts.grep.to/rules#haproxy)
|
||||||
- [Traefik](https://awesome-prometheus-alerts.grep.to/rules#traefik)
|
- [Traefik](https://awesome-prometheus-alerts.grep.to/rules#traefik)
|
||||||
|
|
||||||
|
#### Runtimes
|
||||||
|
|
||||||
- [PHP-FPM](https://awesome-prometheus-alerts.grep.to/rules#php-fpm)
|
- [PHP-FPM](https://awesome-prometheus-alerts.grep.to/rules#php-fpm)
|
||||||
- [Java-Client](https://awesome-prometheus-alerts.grep.to/rules#java-client)
|
- [JVM](https://awesome-prometheus-alerts.grep.to/rules#jvm)
|
||||||
- [ZFS](https://awesome-prometheus-alerts.grep.to/rules#zfs)
|
- [Sidekiq](https://awesome-prometheus-alerts.grep.to/rules#sidekiq)
|
||||||
|
|
||||||
|
#### Orchestrators
|
||||||
- [Kubernetes](https://awesome-prometheus-alerts.grep.to/rules#kubernetes)
|
- [Kubernetes](https://awesome-prometheus-alerts.grep.to/rules#kubernetes)
|
||||||
- [Nomad](https://awesome-prometheus-alerts.grep.to/rules#nomad)
|
- [Nomad](https://awesome-prometheus-alerts.grep.to/rules#nomad)
|
||||||
- [Consul](https://awesome-prometheus-alerts.grep.to/rules#consul)
|
- [Consul](https://awesome-prometheus-alerts.grep.to/rules#consul)
|
||||||
- [Etcd](https://awesome-prometheus-alerts.grep.to/rules#etcd)
|
- [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)
|
- [Linkerd](https://awesome-prometheus-alerts.grep.to/rules#linkerd)
|
||||||
- [Istio](https://awesome-prometheus-alerts.grep.to/rules#istio)
|
- [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)
|
- [Juniper](https://awesome-prometheus-alerts.grep.to/rules#juniper)
|
||||||
- [CoreDNS](https://awesome-prometheus-alerts.grep.to/rules#coredns)
|
- [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.
|
## 🤝 Contributing
|
||||||
Please create an issue or a small pull-request with corrected metric name. 🙏
|
|
||||||
|
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)
|
[Instructions here](CONTRIBUTING.md)
|
||||||
|
|
||||||
## Improvements
|
## 🏋️ Improvements
|
||||||
|
|
||||||
- Create an alert rule builder in Jekyll for custom alerts (severity, thresholds, instances...)
|
- 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)
|
[](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>
|
<!DOCTYPE html>
|
||||||
<html lang="{{ site.lang | default: "en-US" }}">
|
<html lang="{{ site.lang | default: "en-US" }}">
|
||||||
<head>
|
|
||||||
|
|
||||||
{% if site.google_analytics %}
|
<head>
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
<meta charset="UTF-8">
|
||||||
<script>
|
{% seo %}
|
||||||
window.dataLayer = window.dataLayer || [];
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
function gtag(){dataLayer.push(arguments);}
|
<meta name="theme-color" content="#157878">
|
||||||
gtag('js', new Date());
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
||||||
gtag('config', '{{ site.google_analytics }}');
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||||
</script>
|
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
|
||||||
{% endif %}
|
<link rel="stylesheet" href="{{ '/assets/css/app.css?v=' | append: site.github.build_revision | relative_url }}">
|
||||||
<meta charset="UTF-8">
|
<link rel="icon" type="image/png" href="/assets/favicon.ico">
|
||||||
|
|
||||||
{% seo %}
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js"></script>
|
||||||
<meta name="theme-color" content="#157878">
|
<script src="{{ '/assets/js/app.js?v=' | append: site.github.build_revision | relative_url }}"></script>
|
||||||
<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 }}">
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
<link rel="icon" type="image/png" href="/assets/favicon.ico">
|
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-118604063-2"></script>
|
||||||
</head>
|
<script>
|
||||||
<body>
|
window.dataLayer = window.dataLayer || [];
|
||||||
<style>
|
|
||||||
#skip-to-content {
|
function gtag() {
|
||||||
|
dataLayer.push(arguments);
|
||||||
|
}
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', 'UA-118604063-2');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<style>
|
||||||
|
#skip-to-content {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
top: -10px;
|
top: -10px;
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
left: 10px;
|
left: 10px;
|
||||||
height: auto;
|
height: auto;
|
||||||
width: auto;
|
width: auto;
|
||||||
background: invert($body-link-color);
|
background: invert($body-link-color);
|
||||||
outline: thick solid 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">
|
ul.github-buttons-cta li {
|
||||||
<h1 class="project-name">
|
display: inline-block;
|
||||||
<a href="/" style="color: white">
|
height: 20px;
|
||||||
{{ site.title | default: site.github.repository_name }}
|
padding: 0px 15px;
|
||||||
</a>
|
}
|
||||||
</h1>
|
|
||||||
<h2 class="project-tagline">{{ site.description | default: site.github.project_tagline }}</h2>
|
ul.github-buttons-cta li a {
|
||||||
<a href="/alertmanager" class="btn">AlertManager config</a>
|
/* width: 100px; */
|
||||||
<a href="/rules" class="btn">Rules</a>
|
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 %}
|
{% 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 %}
|
{% endif %}
|
||||||
{% if site.show_downloads %}
|
</footer>
|
||||||
<a href="{{ site.github.zip_url }}" class="btn">Download .zip</a>
|
</main>
|
||||||
<a href="{{ site.github.tar_url }}" class="btn">Download .tar.gz</a>
|
</body>
|
||||||
{% endif %}
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<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>
|
<h2>
|
||||||
AlertManager configuration
|
AlertManager configuration
|
||||||
|
|
@ -15,7 +51,7 @@ route:
|
||||||
# notification.
|
# notification.
|
||||||
group_wait: 10s
|
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.
|
# of new alerts that started firing for that group.
|
||||||
group_interval: 5m
|
group_interval: 5m
|
||||||
|
|
||||||
|
|
@ -32,13 +68,13 @@ route:
|
||||||
- receiver: "slack"
|
- receiver: "slack"
|
||||||
group_wait: 10s
|
group_wait: 10s
|
||||||
match_re:
|
match_re:
|
||||||
severity: error|warning
|
severity: critical|warning
|
||||||
continue: true
|
continue: true
|
||||||
|
|
||||||
- receiver: "sms"
|
- receiver: "pager"
|
||||||
group_wait: 10s
|
group_wait: 10s
|
||||||
match_re:
|
match_re:
|
||||||
severity: error
|
severity: critial
|
||||||
continue: true
|
continue: true
|
||||||
|
|
||||||
receivers:
|
receivers:
|
||||||
|
|
@ -49,9 +85,9 @@ receivers:
|
||||||
channel: 'monitoring'
|
channel: 'monitoring'
|
||||||
text: "{{ range .Alerts }}<!channel> {{ .Annotations.summary }}\n{{ .Annotations.description }}\n{{ end }}"
|
text: "{{ range .Alerts }}<!channel> {{ .Annotations.summary }}\n{{ .Annotations.description }}\n{{ end }}"
|
||||||
|
|
||||||
- name: "sms"
|
- name: "pager"
|
||||||
webhook_config:
|
webhook_config:
|
||||||
- url: http://a.b.c:8080/send/sms
|
- url: http://a.b.c.d:8080/send/sms
|
||||||
send_resolved: true
|
send_resolved: true
|
||||||
|
|
||||||
{% endraw %}
|
{% 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>
|
</a>
|
||||||
|
|
||||||
<h2>
|
<h2>
|
||||||
Prometheus alerting rules
|
Out of the box prometheus alerting rules
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for service in site.data.rules.services %}
|
{% for group in site.data.rules.groups %}
|
||||||
<li>
|
<li style="margin-top: 30px;">
|
||||||
<a href="/rules#{{ service.name | replace: " ", "-" | downcase }}">
|
{% assign nbrRules = 0 %}
|
||||||
{{ service.name }}
|
{% for service in group.services %}
|
||||||
</a>
|
{% 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>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
167
rules.md
167
rules.md
|
|
@ -4,102 +4,101 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
{% highlight yaml %}
|
<div style="padding: 20px 20px 10px 20px; border: solid grey 1px; border-radius: 10px;">
|
||||||
# prometheus.yml
|
<h2 style="text-align:center;">⚠️ Caution ⚠️</h2>
|
||||||
|
|
||||||
global:
|
<p style="text-align:center;">
|
||||||
scrape_interval: 15s
|
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:
|
<br>
|
||||||
- 'alerts/*.yml'
|
<br>
|
||||||
|
|
||||||
scrape_configs:
|
<h1></h1>
|
||||||
...
|
|
||||||
|
|
||||||
{% 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 %}
|
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
{% for service in site.data.rules.services %}
|
{% for group in site.data.rules.groups %}
|
||||||
{% assign serviceIndex = forloop.index %}
|
{% assign groupIndex = forloop.index %}
|
||||||
{% for exporter in service.exporters %}
|
{% for service in group.services %}
|
||||||
<li>
|
{% assign serviceIndex = forloop.index %}
|
||||||
<h2 id="{{ service.name | replace: " ", "-" | downcase }}">
|
{% for exporter in service.exporters %}
|
||||||
{{ serviceIndex }}.
|
|
||||||
{{ service.name }}
|
|
||||||
{% if exporter.name %}
|
|
||||||
:
|
|
||||||
{% if exporter.doc_url %}
|
|
||||||
<a href="{{ exporter.doc_url }}">
|
|
||||||
{{ exporter.name }}
|
|
||||||
</a>
|
|
||||||
{% else %}
|
|
||||||
{{ exporter.name }}
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
</h2>
|
|
||||||
|
|
||||||
{% assign nbrRules = exporter.rules | size %}
|
{% assign nbrRules = exporter.rules | size %}
|
||||||
{% if nbrRules == 0 %}
|
<li>
|
||||||
{% highlight javascript %}
|
{% assign serviceId = service.name | replace: " ", "-" | downcase %}
|
||||||
// @TODO
|
<h2 id="{{ serviceId }}">
|
||||||
{% endhighlight %}
|
{{ groupIndex }}.
|
||||||
{% endif %}
|
{{ serviceIndex }}.
|
||||||
|
{{ service.name }}
|
||||||
|
{% if exporter.name %}:
|
||||||
|
{% if exporter.doc_url %}
|
||||||
|
<a href="{{ exporter.doc_url }}">
|
||||||
|
{{ exporter.name }}
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
{{ exporter.name }}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<ul>
|
{% if nbrRules > 0 %}
|
||||||
{% for rule in exporter.rules %}
|
<small style="font-size: 60%; vertical-align: middle; margin-left: 10px;">
|
||||||
{% assign ruleIndex = forloop.index %}
|
({{ nbrRules }} rules)
|
||||||
<li>
|
</small>
|
||||||
<h4>
|
<span class="clipboard-multiple" data-clipboard-target-id="group-{{ groupIndex }}-service-{{ serviceIndex }}">[copy all]</span>
|
||||||
{{ serviceIndex }}.{{ ruleIndex }}.
|
{% endif %}
|
||||||
{{ rule.name }}
|
</h2>
|
||||||
</h4>
|
|
||||||
<details {% if true || (serviceIndex == 1 && ruleIndex == 1) %} open {% endif %}>
|
|
||||||
<summary>{{ rule.description }}</summary>
|
|
||||||
<p>
|
|
||||||
|
|
||||||
{% assign ruleName = rule.name | split: ' ' %}
|
{% if nbrRules == 0 %}
|
||||||
{% capture ruleNameCamelcase %}{% for word in ruleName %}{{ word | capitalize }} {% endfor %}{% endcapture %}
|
{% highlight javascript %}
|
||||||
|
// @TODO: Please contribute => https://github.com/samber/awesome-prometheus-alerts 👋
|
||||||
|
{% endhighlight %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% highlight yaml %}
|
<ul>
|
||||||
- alert: {{ ruleNameCamelcase | remove: ' ' }}
|
{% for rule in exporter.rules %}
|
||||||
expr: {{ rule.query }}
|
{% assign ruleIndex = forloop.index %}
|
||||||
for: 5m
|
{% assign comments = rule.comments | strip | newline_to_br | split: '<br />' %}
|
||||||
labels:
|
<li>
|
||||||
severity: {{ rule.severity }}
|
<h4>
|
||||||
annotations:
|
{{ groupIndex}}.{{ serviceIndex }}.{{ ruleIndex }}.
|
||||||
summary: "{{ rule.name }} (instance {% raw %}{{ $labels.instance }}{% endraw %})"
|
{{ rule.name }}
|
||||||
description: "{{ rule.description }}\n VALUE = {% raw %}{{ $value }}{% endraw %}\n LABELS: {% raw %}{{ $labels }}{% endraw %}"
|
</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 %}
|
{% endhighlight %}
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
</details>
|
</details>
|
||||||
<br/>
|
<br/>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue