Skip to content

Commit

Permalink
fix: alert.rules for prom/prometheus v2.1.0
Browse files Browse the repository at this point in the history
Resolves RisingStack#6
  • Loading branch information
haysclark authored Apr 22, 2020
1 parent c042e0c commit 1073ded
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions prometheus-data/alert.rules
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# APIHighMedianResponseTime
ALERT APIHighMedianResponseTime
IF histogram_quantile(0.5, sum(rate(http_request_duration_ms_bucket[1m])) by (le, service, route, method)) > 100
FOR 60s
ANNOTATIONS {
summary = "High median response time on {{ $labels.service }} and {{ $labels.method }} {{ $labels.route }}",
description = "{{ $labels.service }}, {{ $labels.method }} {{ $labels.route }} has a median response time above 100ms (current value: {{ $value }}ms)",
}
groups:
- name: PM2 Alert
rules:
- alert: APIHighMedianResponseTime
expr: histogram_quantile(0.5, sum(rate(http_request_duration_ms_bucket[1m])) by (le, service, route, method)) > 100
for: 60s
annotations:
summary: "High median response time on {{ $labels.service }} and {{ $labels.method }} {{ $labels.route }}"
description: "{{ $labels.service }}, {{ $labels.method }} {{ $labels.route }} has a median response time above 100ms (current value: {{ $value }}ms)"

0 comments on commit 1073ded

Please sign in to comment.