mirror of
https://github.com/samber/awesome-prometheus-alerts.git
synced 2026-06-21 17:07:24 +08:00
moving prom config to alertmanager page
This commit is contained in:
parent
6408af5ba3
commit
189a3129c3
2 changed files with 41 additions and 37 deletions
|
|
@ -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>
|
||||
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 %}
|
||||
|
|
|
|||
40
rules.md
40
rules.md
|
|
@ -10,46 +10,14 @@
|
|||
<p style="text-align:center;">
|
||||
Alert thresholds depend on nature of applications.
|
||||
<br>
|
||||
Some queries may have arbitrary tolerance threshold.
|
||||
Some queries in this page may have arbitrary tolerance threshold.
|
||||
<br><br>
|
||||
Building an efficient an battle-tested monitoring platform takes time. 😉
|
||||
Building an efficient and battle-tested monitoring platform takes time. 😉
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h2>0. Prometheus global 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 ($instance) down"
|
||||
description: "Whatever"
|
||||
|
||||
{% endhighlight %}
|
||||
<br>
|
||||
<br>
|
||||
|
||||
<ul>
|
||||
{% for service in site.data.rules.services %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue