Merge branch 'version-2' into version-2

This commit is contained in:
田浩 2017-11-10 23:03:23 +08:00 committed by GitHub
commit 79321b1df6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 15 deletions

View File

@ -1,4 +1,4 @@
version: '3.2'
version: '3.1'
volumes:
prometheus_data: {}
@ -11,7 +11,7 @@ networks:
services:
prometheus:
image: prom/prometheus
image: prom/prometheus:v2.0.0
volumes:
- ./prometheus/:/etc/prometheus/
- prometheus_data:/prometheus
@ -38,15 +38,9 @@ services:
node-exporter:
image: prom/node-exporter
volumes:
- type: bind
source: /proc
target: /host/proc
- type: bind
source: /sys
target: /host/sys
- type: bind
source: /
target: /rootfs
- /proc:/host/proc
- /sys:/host/sys
- /:/rootfs
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'

View File

@ -10,7 +10,7 @@ groups:
severity: page
annotations:
summary: "Instance {{ $labels.instance }} down"
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes."
description: "{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 2 minutes."
- alert: high_load
expr: node_load1 > 0.5
@ -19,4 +19,4 @@ groups:
severity: page
annotations:
summary: "Instance {{ $labels.instance }} under high load"
description: "{{ $labels.instance }} of job {{ $labels.job }} is under high load."
description: "{{ $labels.instance }} of job {{ $labels.job }} is under high load."

View File

@ -15,11 +15,13 @@ rule_files:
# - "first.rules"
# - "second.rules"
# alert
alerting:
alertmanagers:
- static_configs:
- scheme: http
static_configs:
- targets:
- alertmanager:9093
- "alertmanager:9093"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.