forked from RisingStack/example-prometheus-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: alert.rules for prom/prometheus v2.1.0
Resolves RisingStack#6
- Loading branch information
Showing
1 changed file
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)" |