bundles/sshmon: add check if OOM killer was active
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2022-01-07 18:07:33 +01:00
parent 14e4415e5f
commit 40a9ac4523
Signed by: kunsi
GPG key ID: 12E3D2136B818350
3 changed files with 19 additions and 1 deletions

View file

@ -0,0 +1,14 @@
#!/bin/bash
journal="$(journalctl --since '12 hours ago' --no-hostname _TRANSPORT=kernel | grep -iF 'out of memory' -C1)"
if [[ -n "$journal" ]]
then
echo "CRITICAL - OOM killer killed processes:"
echo
echo "$journal"
exit 2
else
echo "OK - No OOM kills found in last 12 hours"
exit 0
fi