Merge pull request #290 from LiliC/imrove-targets-down

jsonnet/kube-prometheus/alerts: Add namespace to TargetDown msg
This commit is contained in:
Sergiusz Urbaniak
2019-10-29 15:44:02 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -7,7 +7,7 @@
{ {
alert: 'TargetDown', alert: 'TargetDown',
annotations: { annotations: {
message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }} targets are down.', message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }} targets in {{ $labels.namespace }} namespace 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',

View File

@@ -1185,8 +1185,8 @@ spec:
rules: rules:
- alert: TargetDown - alert: TargetDown
annotations: annotations:
message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }} targets are message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }} targets in
down.' {{ $labels.namespace }} namespace 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