Last active
March 2, 2016 18:20
-
-
Save jirutka/24462017611fdda67398 to your computer and use it in GitHub Desktop.
Very simple NRPE (nagios) module to check crashed services via OpenRC.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# vim: set ts=4: | |
crashed=$(sudo rc-status --crashed) | |
if [ -n "$crashed" ]; then | |
echo "CRITICAL - crashed services: ${crashed//$'\n'/, }" | |
exit 2 | |
else | |
echo 'OK' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment