Add labels for namespace and service to TargetDown
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
annotations: {
|
annotations: {
|
||||||
message: '{{ $value }}% of the {{ $labels.job }} targets are down.',
|
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',
|
'for': '10m',
|
||||||
labels: {
|
labels: {
|
||||||
severity: 'warning',
|
severity: 'warning',
|
||||||
|
@@ -1124,7 +1124,8 @@ spec:
|
|||||||
- alert: TargetDown
|
- alert: TargetDown
|
||||||
annotations:
|
annotations:
|
||||||
message: '{{ $value }}% of the {{ $labels.job }} targets are down.'
|
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
|
for: 10m
|
||||||
labels:
|
labels:
|
||||||
severity: warning
|
severity: warning
|
||||||
|
Reference in New Issue
Block a user