Add failed systemd service alert

Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
This commit is contained in:
Vitaly Zhuravlev 2023-03-28 03:35:41 +08:00 committed by Vitaly Zhuravlev
parent fd2d62af63
commit 74794182a7
1 changed files with 14 additions and 0 deletions

View File

@ -337,6 +337,20 @@
description: 'Memory is filling up on {{ $labels.instance }}, has been above 90% for the last 15 minutes, is currently at {{ printf "%.2f" $value }}%.', description: 'Memory is filling up on {{ $labels.instance }}, has been above 90% for the last 15 minutes, is currently at {{ printf "%.2f" $value }}%.',
}, },
}, },
{
alert: 'NodeSystemdServiceFailed',
expr: |||
node_systemd_unit_state{%(nodeExporterSelector)s, state="failed"} == 1
||| % $._config,
'for': '5m',
labels: {
severity: 'critical',
},
annotations: {
summary: 'Systemd service has entered failed state.',
description: 'Systemd service {{ $labels.name }} has entered failed state on {{ $labels.instance }}',
},
},
], ],
}, },
], ],