Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Commit

Permalink
Fix TargetDown alert text
Browse files Browse the repository at this point in the history
Currently, when TargetDown fires, we get messages like

> 0% of the envoy-stats targets are down.

which is obviously wrong.

The fix is to change the value of the metric. Rather than averaging
`up` to get a percentage of instances that are up, we average `1-up`
to get a percentage of instances that are down.
  • Loading branch information
philandstuff committed Oct 9, 2019
1 parent 45a0687 commit 731d0cf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
- alert: TargetDown
annotations:
message: '{{`{{ $value }}`}}% of the {{`{{ $labels.job }}`}} targets are down.'
expr: 100 * (avg without(instance, pod) (up)) < 90
expr: 100 * (avg without(instance, pod) (1 - up)) > 10
for: 10m
labels:
severity: warning
Expand Down

0 comments on commit 731d0cf

Please sign in to comment.