Merge pull request #400 from JTarasovic/include-service-in-targetdown

Include service in targetdown
This commit is contained in:
Frederic Branczyk
2020-01-30 16:14:25 +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 in {{ $labels.namespace }} namespace are down.', message: '{{ printf "%.4g" $value }}% of the {{ $labels.job }}/{{ $labels.service }} 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

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