summaryrefslogtreecommitdiff
path: root/example/site_check_mk/files/agent
diff options
context:
space:
mode:
Diffstat (limited to 'example/site_check_mk/files/agent')
-rw-r--r--example/site_check_mk/files/agent/apt/check_apt15
-rw-r--r--example/site_check_mk/files/agent/logwatch/syslog_header.cfg1
-rw-r--r--example/site_check_mk/files/agent/logwatch/syslog_tail.cfg11
3 files changed, 27 insertions, 0 deletions
diff --git a/example/site_check_mk/files/agent/apt/check_apt b/example/site_check_mk/files/agent/apt/check_apt
new file mode 100644
index 0000000..223dd8a
--- /dev/null
+++ b/example/site_check_mk/files/agent/apt/check_apt
@@ -0,0 +1,15 @@
+#!/bin/sh
+# check_apt wrapper to gather more info about pending packages
+
+# call the original plugin
+MSG=`/usr/lib/nagios/plugins/check_apt $*`
+
+EXIT=$?
+
+echo -n $MSG | sed 's/available for upgrade/upgradable/' | sed 's/ updates//' | sed 's/\./:/'
+
+if [ "$EXIT" != "0" ]
+then
+apt-get -s upgrade|egrep '(^ |wi ll be up|kept back)'|sed 's/The following packages will be upgraded://'| tr '\n' ' ' | sed 's/ */ /g'
+exit $EXIT
+fi
diff --git a/example/site_check_mk/files/agent/logwatch/syslog_header.cfg b/example/site_check_mk/files/agent/logwatch/syslog_header.cfg
new file mode 100644
index 0000000..f60d752
--- /dev/null
+++ b/example/site_check_mk/files/agent/logwatch/syslog_header.cfg
@@ -0,0 +1 @@
+/var/log/syslog
diff --git a/example/site_check_mk/files/agent/logwatch/syslog_tail.cfg b/example/site_check_mk/files/agent/logwatch/syslog_tail.cfg
new file mode 100644
index 0000000..450b9e9
--- /dev/null
+++ b/example/site_check_mk/files/agent/logwatch/syslog_tail.cfg
@@ -0,0 +1,11 @@
+# some general patterns
+ C panic
+ C Oops
+ I Error: Driver 'pcspkr' is already registered, aborting...
+ C Error
+ C error
+ W generic protection rip
+ W .*Unrecovered read error - auto reallocate failed
+# 401 Unauthorized error logged by webapp and possible other
+# applications
+ C Unauthorized