Module: check_mk
Branch: master
Commit: b891799a186734e725aec50b9d4a24ede3b5694f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=b891799a186734…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Wed Mar 20 07:28:51 2019 +0100
7126 FIX fireeye_mailq: Missing SNMP device data causes an "IndexError: list index
out of range" error
Change-Id: Iea7d6afeaaecd0d622a1178c9299ea0fb6a66b64
---
.werks/7126 | 11 +++++++++++
checks/fireeye_mailq | 6 +++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/.werks/7126 b/.werks/7126
new file mode 100644
index 0000000..e6e4dcf
--- /dev/null
+++ b/.werks/7126
@@ -0,0 +1,11 @@
+Title: fireeye_mailq: Missing SNMP device data causes an "IndexError: list index out
of range" error
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+Edition: cre
+State: unknown
+Version: 1.6.0i1
+Date: 1553063264
+
+
diff --git a/checks/fireeye_mailq b/checks/fireeye_mailq
index 7e1c81b..b1feb65 100644
--- a/checks/fireeye_mailq
+++ b/checks/fireeye_mailq
@@ -39,9 +39,13 @@ factory_settings['fireeye_mailq'] = {
def parse_fireeye_mailq(info):
+ try:
+ queue_infos = info[0]
+ except IndexError:
+ return {}
parsed = {}
for index, item in enumerate(['Deferred', 'Hold', 'Incoming',
'Active', 'Drop']):
- parsed.update({item: info[0][index]})
+ parsed.update({item: queue_infos[index]})
return parsed