Add labels for namespace and service to TargetDown

This commit is contained in:
Kyle Byerly
2019-08-28 13:09:45 -06:00
parent 9c82f86770
commit fda5811975
2 changed files with 3 additions and 2 deletions

View File

@@ -9,7 +9,7 @@
annotations: {
message: '{{ $value }}% of the {{ $labels.job }} targets are down.',
},
expr: '100 * (count(up == 0) BY (job) / count(up) BY (job)) > 10',
expr: '100 * (count(up == 0) BY (job, namespace, service) / count(up) BY (job, namespace, service)) > 10',
'for': '10m',
labels: {
severity: 'warning',

View File

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