Module: check_mk
Branch: master
Commit: 8e53bf53d0bf4ae79c5f9919245d20a04e9bd24e
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=8e53bf53d0bf4a…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Fri Dec 12 15:45:19 2014 +0100
#1756 FIX agent_ibmsvc: do not abort execution if one of the sections fail
---
.werks/1756 | 10 ++++++++++
ChangeLog | 1 +
agents/special/agent_ibmsvc | 6 +++---
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/1756 b/.werks/1756
new file mode 100644
index 0000000..8785356
--- /dev/null
+++ b/.werks/1756
@@ -0,0 +1,10 @@
+Title: agent_ibmsvc: do not abort execution if one of the sections fail
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i1
+Date: 1418395490
+
+
diff --git a/ChangeLog b/ChangeLog
index cfb6439..bc69ab6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
* 1762 FIX: lnx_thermal: Now ignoring trip points with level 0...
* 1763 FIX: diskstat: Fixed error in config example of manpage
* 1755 FIX: cisco_vpn_tunnel: fix exception in case tunnel is not OK
+ * 1756 FIX: agent_ibmsvc: do not abort execution if one of the sections fail
Multisite:
* 1758 Improved exception hander: Shows details without additional debug request,
added mailto link for error report...
diff --git a/agents/special/agent_ibmsvc b/agents/special/agent_ibmsvc
old mode 100755
new mode 100644
index 30a4815..a12926b
--- a/agents/special/agent_ibmsvc
+++ b/agents/special/agent_ibmsvc
@@ -1,3 +1,4 @@
+OMD[iptv]:~/local/share/check_mk/agents/special$ cat agent_ibmsvc
#!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
@@ -177,7 +178,7 @@ cmd = "ssh -o ConnectTimeout=%s %s %s@%s '" %
(opt_timeout, opt_any_hostkey, use
for module in command_options.keys():
if command_options[module]["active"] == True:
cmd += "echo \<\<\<%s:sep\(58\)\>\>\>;" %
command_options[module]["section_header"]
- cmd += "%s;" % command_options[module]["command"]
+ cmd += "%s || true;" % command_options[module]["command"]
cmd += "'"
if opt_debug:
@@ -189,7 +190,7 @@ stdout, stderr = result.communicate()
exit_code = result.wait()
if exit_code not in [ 0, 1 ]:
- sys.stderr.write("Error connecting via ssh")
+ sys.stderr.write("Error connecting via ssh: %s\n" % stderr)
sys.exit(2)
lines = stdout.split('\n')
@@ -219,4 +220,3 @@ def output_profile():
if g_profile:
output_profile()
-