mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
docker: adds alertmanager to prometheus fig
with an alert rule that will always fire
This commit is contained in:
parent
a45e2ec9c3
commit
53d862143b
@ -1,2 +1,3 @@
|
||||
FROM prom/prometheus
|
||||
ADD prometheus.yml /etc/prometheus/
|
||||
ADD alert.rules /etc/prometheus/
|
||||
|
10
docker/blocks/prometheus/alert.rules
Normal file
10
docker/blocks/prometheus/alert.rules
Normal file
@ -0,0 +1,10 @@
|
||||
# Alert Rules
|
||||
|
||||
ALERT AppCrash
|
||||
IF process_open_fds > 0
|
||||
FOR 15s
|
||||
LABELS { severity="critical" }
|
||||
ANNOTATIONS {
|
||||
summary = "Number of open fds > 0",
|
||||
description = "Just testing"
|
||||
}
|
@ -18,3 +18,8 @@ fake-prometheus-data:
|
||||
environment:
|
||||
FD_DATASOURCE: prom
|
||||
|
||||
alertmanager:
|
||||
image: quay.io/prometheus/alertmanager
|
||||
net: host
|
||||
ports:
|
||||
- "9093:9093"
|
||||
|
@ -6,9 +6,18 @@ global:
|
||||
|
||||
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
|
||||
rule_files:
|
||||
- "alert.rules"
|
||||
# - "first.rules"
|
||||
# - "second.rules"
|
||||
|
||||
alerting:
|
||||
alertmanagers:
|
||||
- scheme: http
|
||||
static_configs:
|
||||
- targets:
|
||||
- "127.0.0.1:9093"
|
||||
|
||||
|
||||
# A scrape configuration containing exactly one endpoint to scrape:
|
||||
# Here it's Prometheus itself.
|
||||
scrape_configs:
|
||||
|
Loading…
Reference in New Issue
Block a user