update alert
This commit is contained in:
parent
35673af98d
commit
806d49c002
|
@ -17,8 +17,7 @@ services:
|
|||
- prometheus_data:/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.local.path=/prometheus'
|
||||
- '--alertmanager.url=http://alertmanager:9093'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
|
||||
- '--web.console.templates=/usr/share/prometheus/consoles'
|
||||
ports:
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
ALERT service_down
|
||||
IF up == 0
|
||||
|
||||
ALERT high_load
|
||||
IF node_load1 > 0.5
|
||||
ANNOTATIONS {
|
||||
summary = "Instance {{ $labels.instance }} under high load",
|
||||
description = "{{ $labels.instance }} of job {{ $labels.job }} is under high load.",
|
||||
}
|
||||
groups:
|
||||
- name: example
|
||||
rules:
|
||||
- alert: InstanceDown
|
||||
expr: up == 0
|
||||
for: 5m
|
||||
labels:
|
||||
severity: page
|
||||
annotations:
|
||||
summary: "Instance {{ $labels.instance }} down"
|
||||
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes."
|
|
@ -15,6 +15,14 @@ rule_files:
|
|||
# - "first.rules"
|
||||
# - "second.rules"
|
||||
|
||||
# alert
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- scheme: http
|
||||
static_configs:
|
||||
- targets:
|
||||
- "alertmanager:9093"
|
||||
|
||||
# A scrape configuration containing exactly one endpoint to scrape:
|
||||
# Here it's Prometheus itself.
|
||||
scrape_configs:
|
||||
|
|
Loading…
Reference in New Issue