aboutsummaryrefslogtreecommitdiffstats
path: root/main/nagios-plugins/check_openrc
diff options
context:
space:
mode:
Diffstat (limited to 'main/nagios-plugins/check_openrc')
-rw-r--r--main/nagios-plugins/check_openrc11
1 files changed, 11 insertions, 0 deletions
diff --git a/main/nagios-plugins/check_openrc b/main/nagios-plugins/check_openrc
new file mode 100644
index 0000000000..b21d6baebf
--- /dev/null
+++ b/main/nagios-plugins/check_openrc
@@ -0,0 +1,11 @@
+#!/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