mirror of
https://github.com/prometheus-operator/kube-prometheus.git
synced 2025-08-27 01:11:53 +02:00
jsonnet/kube-prometheus/alerts: improve TargetDown message
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
dc20838d65
commit
b9504efef7
@ -7,7 +7,7 @@
|
|||||||
{
|
{
|
||||||
alert: 'TargetDown',
|
alert: 'TargetDown',
|
||||||
annotations: {
|
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',
|
expr: '100 * (count(up == 0) BY (job, namespace, service) / count(up) BY (job, namespace, service)) > 10',
|
||||||
'for': '10m',
|
'for': '10m',
|
||||||
|
@ -1123,7 +1123,8 @@ spec:
|
|||||||
rules:
|
rules:
|
||||||
- alert: TargetDown
|
- alert: TargetDown
|
||||||
annotations:
|
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,
|
expr: 100 * (count(up == 0) BY (job, namespace, service) / count(up) BY (job,
|
||||||
namespace, service)) > 10
|
namespace, service)) > 10
|
||||||
for: 10m
|
for: 10m
|
||||||
|
Loading…
x
Reference in New Issue
Block a user