Module: check_mk
Branch: master
Commit: f65efe22bed207371101617fc0642d4eef284cf0
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f65efe22bed207…
Author: Simon Betz <si(a)mathias-kettner.de>
Date: Mon Dec 12 16:00:01 2016 +0100
4163 FIX kernel: fixed empty data handling
Change-Id: Ib97f88a7bc32d1910a720ece7172e4d9eb736aee
---
.werks/4163 | 10 ++++++++++
ChangeLog | 1 +
checks/kernel | 4 +++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/.werks/4163 b/.werks/4163
new file mode 100644
index 0000000..77d83ec
--- /dev/null
+++ b/.werks/4163
@@ -0,0 +1,10 @@
+Title: kernel: fixed empty data handling
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.4.0i3
+Date: 1481554785
+
+
diff --git a/ChangeLog b/ChangeLog
index f6df498..a1d7cac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -63,6 +63,7 @@
* 4160 FIX: emcvnx_info: fixed data handling, now detects errors
* 4161 FIX: emcvnx_sp_util: fixed empty data handling
* 4162 FIX: esx_vsphere_vm.heartbeat: fixed KeyError
+ * 4163 FIX: kernel: fixed empty data handling
Multisite:
* 4070 Added a painter for the service check period
diff --git a/checks/kernel b/checks/kernel
index af2487e..6a9e2f8 100644
--- a/checks/kernel
+++ b/checks/kernel
@@ -57,8 +57,10 @@ def inventory_kernel(info):
# item is one of the keys in /proc/stat or /proc/vmstat
def check_kernel(item, params, info):
- this_time = int(info[0][0])
+ if not info:
+ return
+ this_time = int(info[0][0])
hits = [ (line[0], line[1])
for line in info[1:]
if line[0] == item or kernel_counter_names.get(line[0], line[0]) == item ]