Module: check_mk
Branch: master
Commit: 799631f70855d5c25c39b7c17147d2bb2dc919a1
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=799631f70855d5…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Tue Jan 29 15:26:30 2013 +0100
Linux agent: add section for livestatus monitoring
---
agents/check_mk_agent.linux | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 206d353..4c56913 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -429,6 +429,22 @@ if [ -r "$MK_CONFDIR/fileinfo.cfg" ] ; then
stat -c "%n|%s|%Y" $(cat "$MK_CONFDIR/fileinfo.cfg")
fi
+# Get stats about OMD monitoring cores running on this machine.
+# Since cd is a shell builtin the check does not affect the performance
+# on non-OMD machines.
+if cd /omd/sites
+then
+ echo '<<<livestatus_status:sep(59)>>>'
+ for live in */tmp/run/live
+ do
+ if [ -S "$live" ] ; then
+ site=${live%%/*}
+ echo "[$site]"
+ echo -e "GET status" | /omd/sites/$site/bin/unixcat
/omd/sites/$live
+ fi
+ done
+fi
+
# Einbinden von lokalen Plugins, die eine eigene Sektion ausgeben
if cd $PLUGINSDIR