Module: check_mk
Branch: master
Commit: cb80e8eeb9b0947694a036471f359ab804631617
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=cb80e8eeb9b094…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jan 30 09:29:15 2015 +0100
#1881 FIX omd_status: Check works now event when a site is reported as not OK
The check resulted in state UNKNOWN because the agent section was missing
when at least one site had a problem.
---
.werks/1881 | 11 +++++++++++
ChangeLog | 1 +
agents/check_mk_agent.linux | 3 ++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/1881 b/.werks/1881
new file mode 100644
index 0000000..e634fc3
--- /dev/null
+++ b/.werks/1881
@@ -0,0 +1,11 @@
+Title: omd_status: Check works now event when a site is reported as not OK
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1422606490
+
+The check resulted in state UNKNOWN because the agent section was missing
+when at least one site had a problem.
diff --git a/ChangeLog b/ChangeLog
index 6f80e71..e3f5ea9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -119,6 +119,7 @@
* 1877 FIX: printer_input/printer_output: Check can now handle non reported capacity
unit
* 1921 FIX: kemp_loadmaster_realserver: reimplementation, now use vendor specific
information
* 1859 FIX: cups_queues: linux agent now runs section cups_queues in cached mode...
+ * 1881 FIX: omd_status: Check works now event when a site is reported as not OK...
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request,
added mailto link for error report...
diff --git a/agents/check_mk_agent.linux b/agents/check_mk_agent.linux
index 6a35472..a067ed7 100755
--- a/agents/check_mk_agent.linux
+++ b/agents/check_mk_agent.linux
@@ -101,6 +101,7 @@ function run_cached () {
# Cache file outdated and new job not yet running? Start it
if [ -z "$USE_CACHEFILE" -a ! -e "$CACHEFILE.new" ] ; then
+ # When the command fails, the output is throws away ignored
echo "set -o noclobber ; exec > \"$CACHEFILE.new\" || exit 1 ;
$CMDLINE && mv \"$CACHEFILE.new\" \"$CACHEFILE\" || rm -f
\"$CACHEFILE\" \"$CACHEFILE.new\"" | nohup bash >/dev/null
2>&1 &
fi
}
@@ -513,7 +514,7 @@ fi
# Check status of OMD sites
if type omd >/dev/null
then
- run_cached -s omd_status 60 "omd status --bare --auto"
+ run_cached -s omd_status 60 "omd status --bare --auto || true"
fi