Module: check_mk
Branch: master
Commit: 16bdad2c12f8ea14e52fa1e00112435ec1052771
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=16bdad2c12f8ea…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri May 25 20:52:27 2018 +0200
6175 FIX docker_container_status: Fixed broken check regression in 1.5.0b5
Change-Id: I201b52975adacb227398fdbfbcb7d755ebef1098
---
.werks/6175 | 11 +++++++++++
checks/docker_container_status | 4 ++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/.werks/6175 b/.werks/6175
new file mode 100644
index 0000000..b5d65cc
--- /dev/null
+++ b/.werks/6175
@@ -0,0 +1,11 @@
+Title: docker_container_status: Fixed broken check regression in 1.5.0b5
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1527274321
+
+
diff --git a/checks/docker_container_status b/checks/docker_container_status
index 09e47e4..68604bb 100644
--- a/checks/docker_container_status
+++ b/checks/docker_container_status
@@ -28,14 +28,14 @@
def parse_docker_container_status(info):
- if not info:
+ if not info or not info[0]:
return
# In case there are multiple lines of output sent by the agent only process the
first
# line. We assume that this a full JSON object. The rest of the section is skipped.
# When a container got piggyback data from multiple hosts (e.g. a cluster) this
results
# in multiple JSON objects handed over to this check.
- json_raw_data = info[0]
+ json_raw_data = info[0][0]
import json
return json.loads(json_raw_data)