Merge pull request #70 from eduponte/version-2

Update configs to Prometheus v2
This commit is contained in:
田浩 2017-11-10 23:33:54 +08:00 committed by GitHub
commit 8c8badfd74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 4 deletions

View File

@ -1,11 +1,22 @@
groups:
- name: example
rules:
- alert: InstanceDown
# Alert for any instance that is unreachable for >5 minutes.
- alert: service_down
expr: up == 0
for: 5m
for: 2m
labels:
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
for: 2m
labels:
severity: page
annotations:
summary: "Instance {{ $labels.instance }} under high load"
description: "{{ $labels.instance }} of job {{ $labels.job }} is under high load."

View File

@ -11,7 +11,7 @@ global:
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
- "alert.rules"
- 'alert.rules'
# - "first.rules"
# - "second.rules"