Module: check_mk
Branch: master
Commit: 7b69078bc48b1e863bd8566b0f45e9a2a6ade10c
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=7b69078bc48b1e…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon May 8 15:26:23 2017 +0200
4647 FIX websphere_mq_queues: Fixed 'list index out of range' error
Change-Id: I67a7d6c2299ebd118436a242427741de383a9c72
---
.werks/4647 | 13 +++++++++++++
checks/websphere_mq_queues | 3 +++
2 files changed, 16 insertions(+)
diff --git a/.werks/4647 b/.werks/4647
new file mode 100644
index 0000000..8c563ee
--- /dev/null
+++ b/.werks/4647
@@ -0,0 +1,13 @@
+Title: websphere_mq_queues: Fixed 'list index out of range' error
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.5.0i1
+Date: 1494249613
+
+In case of above error lines of the agent output may contain
+incomplete data, eg. only queue name without any additional
+queue information such as current queue length.
diff --git a/checks/websphere_mq_queues b/checks/websphere_mq_queues
index 4c27807..de6d0b0 100644
--- a/checks/websphere_mq_queues
+++ b/checks/websphere_mq_queues
@@ -65,6 +65,9 @@ websphere_mq_queues_default_levels = {
def parse_websphere_mq_queues(info):
parsed = {}
for line in info:
+ if len(line) < 2:
+ continue
+
queue_name = line[1]
parsed.setdefault(queue_name, {})
parsed[queue_name].setdefault('cur_depth', int(line[0]))