Module: check_mk
Branch: master
Commit: 4c158fe1b7f7389999640df8b52cacf4173651a2
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4c158fe1b7f738…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Thu Sep 3 12:02:28 2015 +0200
Conflicts:
ChangeLog
checks/oracle_recovery_status
---
.werks/2554 | 10 ++++++++++
ChangeLog | 1 +
checks/oracle_recovery_status | 8 +++++++-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/.werks/2554 b/.werks/2554
new file mode 100644
index 0000000..a28ed12
--- /dev/null
+++ b/.werks/2554
@@ -0,0 +1,10 @@
+Title: oracle_recovery_status: Fixed exception when files have no checkpoints
+Level: 1
+Component: checks
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1441274480
+
+
diff --git a/ChangeLog b/ChangeLog
index 5a5a327..988783f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -159,6 +159,7 @@
* 2576 FIX: symantec_av_updates: fix crash due to missing datetime module, also
handle DD.MM.YYYY date format
* 2567 FIX: jolokia_metrics: fixed crash if agent output is missing memory metrics
* 2577 FIX: printer_input, printer_output: Fix exception on Brother NC-340h
+ * 2554 FIX: oracle_recovery_status: Fixed exception when files have no checkpoints
Multisite:
* 2385 SEC: Fixed possible reflected XSS on all GUI pages where users can produce
unhandled exceptions...
diff --git a/checks/oracle_recovery_status b/checks/oracle_recovery_status
index 0c6b100..3f100ff 100644
--- a/checks/oracle_recovery_status
+++ b/checks/oracle_recovery_status
@@ -34,6 +34,12 @@
# TUX2|tux2|PRIMARY|READ WRITE|1|1419771465|317|ONLINE|NO|YES|8149107|NOT ACTIVE|489
# TUX2|tux2|PRIMARY|READ WRITE|2|1419771465|317|ONLINE|NO|YES|8149107|NOT ACTIVE|489
+# Databases seem to also report lines with some data missing:
+# PV|PV|PRIMARY|READ WRITE|397|1433251398|7297|ONLINE|NO|YES|10740614283
+# PV|PV|PRIMARY|READ WRITE|398|1433251398|7297|ONLINE|NO|YES|10740614283
+# PV|PV|PRIMARY|READ WRITE|399|||ONLINE|||0
+# PV|PV|PRIMARY|READ WRITE|400|||ONLINE|||0
+# PV|PV|PRIMARY|READ WRITE|401|||ONLINE|||0
def inventory_oracle_recovery_status(info):
return [ ( line[0], {} ) for line in info ]
@@ -76,7 +82,7 @@ def check_oracle_recovery_status(item, params, info):
if datafilestatus == 'ONLINE':
if backup_state == 'FILE MISSING':
filemissingcount += 1
- else:
+ elif checkpoint_age:
checkpoint_age = int(checkpoint_age)
if oldest_checkpoint_age is None: