bundles/sshmon: add check if OOM killer was active
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
All checks were successful
kunsi/bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
14e4415e5f
commit
40a9ac4523
3 changed files with 19 additions and 1 deletions
14
bundles/sshmon/files/check_oom_killer
Normal file
14
bundles/sshmon/files/check_oom_killer
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue