Module: check_mk
Branch: master
Commit: 366e8faed1293febefccc7fb5ef898b41836ee13
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=366e8faed1293f…
Author: Andreas Boesl <ab(a)mathias-kettner.de>
Date: Mon Sep 15 09:40:50 2014 +0200
#1113 FIX oracle_rman: fixed exception when backup was currently running
---
.werks/1113 | 9 +++++++++
ChangeLog | 1 +
checks/oracle_rman | 4 +++-
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/.werks/1113 b/.werks/1113
new file mode 100644
index 0000000..fc764bb
--- /dev/null
+++ b/.werks/1113
@@ -0,0 +1,9 @@
+Title: oracle_rman: fixed exception when backup was currently running
+Level: 1
+Component: checks
+Compatible: compat
+Version: 1.2.5i6
+Date: 1410766821
+Class: fix
+
+
diff --git a/ChangeLog b/ChangeLog
index 1156af0..ced4d3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -91,6 +91,7 @@
NOTE: Please refer to the migration notes!
* 1104 FIX: winperf_if: Improved matching of data from wmic_if.bat / wmic_if.ps1
scripts...
* 1110 FIX: windows agent: fixed missing agent section problem if a cached script ran
into a timeout...
+ * 1113 FIX: oracle_rman: fixed exception when backup was currently running
Multisite:
* 1066 Implemented Dashboard Designer...
diff --git a/checks/oracle_rman b/checks/oracle_rman
index 030c56b..b4b4caf 100644
--- a/checks/oracle_rman
+++ b/checks/oracle_rman
@@ -28,7 +28,7 @@
# TUX2 COMPLETED 2014-07-08_17:27:59 2014-07-08_17:29:35 DB_INCR 32
# TUX2 COMPLETED 2014-07-08_17:30:02 2014-07-08_17:30:06 ARCHIVELOG 121
-# Columns: SID STATUS START END BACKUPTYPE BACKUAGE
+# Columns: SID STATUS START END BACKUPTYPE BACKUPAGE
def inventory_oracle_rman(info):
return [ (line[0] + "." + line[4], {}) for line in info
@@ -39,6 +39,8 @@ def inventory_oracle_rman(info):
def check_oracle_rman(item, params, info):
for sid, status, start, end, backuptype, backupage in info:
if item == sid + "." + backuptype:
+ if not backupage:
+ return 0, "Backup is currently running"
backupage = int(backupage)
infotext = "Last backup %s ago" % get_age_human_readable(backupage
* 60)