From 189a3129c3227400ebf8b9ba516dcbb5061852e4 Mon Sep 17 00:00:00 2001 From: Samuel Berthe Date: Sun, 8 Mar 2020 23:06:33 +0100 Subject: [PATCH] moving prom config to alertmanager page --- alertmanager.md | 38 +++++++++++++++++++++++++++++++++++++- rules.md | 40 ++++------------------------------------ 2 files changed, 41 insertions(+), 37 deletions(-) diff --git a/alertmanager.md b/alertmanager.md index d03bc4d..2d8595c 100644 --- a/alertmanager.md +++ b/alertmanager.md @@ -1,3 +1,39 @@ +

+ Prometheus configuration +

+ +{% 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: error + annotations: + summary: "Redis instance down" + description: "Whatever" + +{% endhighlight %}

AlertManager configuration @@ -51,7 +87,7 @@ receivers: - name: "sms" webhook_config: - - url: http://a.b.c:8080/send/sms + - url: http://a.b.c.d:8080/send/sms send_resolved: true {% endraw %} diff --git a/rules.md b/rules.md index 15544f1..ef33915 100644 --- a/rules.md +++ b/rules.md @@ -10,46 +10,14 @@

Alert thresholds depend on nature of applications.
- Some queries may have arbitrary tolerance threshold. + Some queries in this page may have arbitrary tolerance threshold.

- Building an efficient an battle-tested monitoring platform takes time. 😉 + Building an efficient and battle-tested monitoring platform takes time. 😉

-

0. Prometheus global configuration

- -{% 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: error - annotations: - summary: "Redis instance ($instance) down" - description: "Whatever" - -{% endhighlight %} +
+