moving prom config to alertmanager page

This commit is contained in:
Samuel Berthe 2020-03-08 23:06:33 +01:00
parent 6408af5ba3
commit 189a3129c3
No known key found for this signature in database
GPG key ID: 9D7813625412A946
2 changed files with 41 additions and 37 deletions

View file

@ -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: error
annotations:
summary: "Redis instance down"
description: "Whatever"
{% endhighlight %}
<h2> <h2>
AlertManager configuration AlertManager configuration
@ -51,7 +87,7 @@ receivers:
- name: "sms" - name: "sms"
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 %}

View file

@ -10,46 +10,14 @@
<p style="text-align:center;"> <p style="text-align:center;">
Alert thresholds depend on nature of applications. Alert thresholds depend on nature of applications.
<br> <br>
Some queries may have arbitrary tolerance threshold. Some queries in this page may have arbitrary tolerance threshold.
<br><br> <br><br>
Building an efficient an battle-tested monitoring platform takes time. 😉 Building an efficient and battle-tested monitoring platform takes time. 😉
</p> </p>
</div> </div>
<h2>0. Prometheus global configuration</h2> <br>
<br>
{% 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 %}
<ul> <ul>
{% for service in site.data.rules.services %} {% for service in site.data.rules.services %}