jsonnet/kube-prometheus/alerts: improve TargetDown message

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
Simon Pasquier
2019-09-24 17:52:48 +02:00
parent dc20838d65
commit b9504efef7
2 changed files with 3 additions and 2 deletions

View File

@@ -1123,7 +1123,8 @@ spec:
rules:
- alert: TargetDown
annotations:
message: '{{ $value }}% of the {{ $labels.job }} targets are down.'
message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }} targets are
down.'
expr: 100 * (count(up == 0) BY (job, namespace, service) / count(up) BY (job,
namespace, service)) > 10
for: 10m