Module: check_mk
Branch: master
Commit: 1c6194b0c70b71ef6ae4b5cc7018b8bfb7983d82
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=1c6194b0c70b71…
Author: Marcel Arentz <ma(a)mathias-kettner.de>
Date: Mon Dec 12 21:10:38 2016 +0100
4161 FIX oracle_dataguard_stats, oracle_longactivesessions, oracle_rman: fixed crashes
Fixed crashes on Checks if there are timestamps in the output.
Change-Id: I1f9dc6d33f2264418a888ba8a9f419006b85b776
---
.werks/4161 | 9 ++++-----
ChangeLog | 2 +-
checks/oracle_dataguard_stats | 4 +++-
checks/oracle_longactivesessions | 3 +++
checks/oracle_rman | 2 ++
5 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/.werks/4161 b/.werks/4161
index 8ef12be..e9b4435 100644
--- a/.werks/4161
+++ b/.werks/4161
@@ -1,10 +1,9 @@
-Title: emcvnx_sp_util: fixed empty data handling
+Title: oracle_dataguard_stats, oracle_longactivesessions, oracle_rman: fixed crashes
Level: 1
Component: checks
-Class: fix
Compatible: compat
-State: unknown
Version: 1.4.0i3
-Date: 1481550595
-
+Date: 1481573325
+Class: fix
+Fixed crashes on Checks if there are timestamps in the output.
diff --git a/ChangeLog b/ChangeLog
index 6b31573..a161a04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -60,12 +60,12 @@
* 4158 FIX: fileinfo: fixed file handling containing spaces
* 4101 FIX: citrix_sessions: Output error message in case of missing session
information....
* 4102 FIX: logwatch: Fixed crash due to non-existant logfile...
- * 4161 FIX: emcvnx_sp_util: fixed empty data handling
* 4162 FIX: esx_vsphere_vm.heartbeat: fixed KeyError
* 4163 FIX: kernel: fixed empty data handling
* 4164 FIX: livestatus_status: fixed ValueError for values in scientific notation
* 4103 FIX: kaspersky_av_client: No longer crash when date of last full scan is
unknown...
* 4160 FIX: apt: Fixed crash on unexpected output...
+ * 4161 FIX: oracle_dataguard_stats, oracle_longactivesessions, oracle_rman: fixed
crashes...
Multisite:
* 4070 Added a painter for the service check period
diff --git a/checks/oracle_dataguard_stats b/checks/oracle_dataguard_stats
index 953cb90..773a77c 100644
--- a/checks/oracle_dataguard_stats
+++ b/checks/oracle_dataguard_stats
@@ -35,7 +35,9 @@
def inventory_oracle_dataguard_stats(info):
inventory = []
for line in info:
- inventory.append(("%s.%s" % (line[0], line[1]), {}))
+ if len(line) == 1:
+ continue
+ inventory.append(("%s.%s" % (line[0], line[1]), {}))
return inventory
def check_oracle_dataguard_stats(item, params, info):
diff --git a/checks/oracle_longactivesessions b/checks/oracle_longactivesessions
index 5a1a60c..a1f8ebc 100644
--- a/checks/oracle_longactivesessions
+++ b/checks/oracle_longactivesessions
@@ -46,6 +46,9 @@ def check_oracle_longactivesessions(item, params, info):
for line in info:
+ if len(line) <= 1:
+ continue
+
warn, crit = params["levels"]
if line[0] == item:
diff --git a/checks/oracle_rman b/checks/oracle_rman
index e2d64c5..c790478 100644
--- a/checks/oracle_rman
+++ b/checks/oracle_rman
@@ -43,6 +43,8 @@ inventory_oracle_rman_incremental_details = True
def inventory_oracle_rman(info):
inventory = []
for line in info:
+ if len(line) == 1:
+ continue
if line[4] in ('ARCHIVELOG', 'DB_FULL', 'DB_INCR',
'CONTROLFILE'):
if len(line) == 8: